Updates to ref docs

This commit is contained in:
Janne Valkealahti
2015-03-25 14:14:56 +00:00
parent 34bbc910fc
commit 0b071bd35a
4 changed files with 106 additions and 10 deletions

View File

@@ -197,6 +197,15 @@ Entry for principal HTTP/neo.example.org@EXAMPLE.ORG with kvno 2, encryption typ
This was tested using `Windows Server 2012 R2`
[TIP]
====
Internet is full of good articles and videos how to setup Windows AD
but these two are quite usefull
http://www.rackspace.com/knowledge_center/article/installing-active-directory-on-windows-server-2012[Rackspace] and
http://social.technet.microsoft.com/wiki/contents/articles/12370.windows-server-2012-set-up-your-first-domain-controller-step-by-step.aspx[Microsoft
Technet].
====
- Normal domain controller and active directory setup was done.
- Used dns domain `example.org` and windows domain `EXAMPLE`.
- I created various domain users like `user1`, `user2`, `user3`,

View File

@@ -2,19 +2,14 @@
= Spring Security Kerberos Samples
This part of the reference documentation is introducing samples
projects. Generally samples can be either compiled manually by
building main distribution from
https://github.com/spring-projects/spring-security-kerberos or using
nightly snapshots or actual release builds.
- http://repo.spring.io/libs-snapshot/org/springframework/security/kerberos/
- http://repo.spring.io/libs-release/org/springframework/security/kerberos/
projects. Samples can be compiled manually by building main
distribution from
https://github.com/spring-projects/spring-security-kerberos.
[IMPORTANT]
====
If you download and run sample from a maven repo it will not work
until a correct configuration is applied. See notes below for specific
samples.
If you run sample as is it will not work until a correct configuration
is applied. See notes below for specific samples.
====
<<samples-sec-server-win-auth>> sample for Windows environment
@@ -49,6 +44,8 @@ server:
ad-server: ldap://WIN-EKBO0EQ7TS7.example.org/
service-principal: HTTP/neo.example.org@EXAMPLE.ORG
keytab-location: /tmp/tomcat.keytab
ldap-search-base: dc=example,dc=org
ldap-search-filter: "(| (userPrincipalName={0}) (sAMAccountName={0}))"
----
In above you can see the default configuration for this sample. You
can override these settings using a normal Spring Boot tricks like

View File

@@ -73,3 +73,26 @@ With keytab file.
include::samples/KerberosRestTemplateConfig.java[tags=snippetB]
----
[[ssk-kerberosldap]]
== Authentication with LDAP Services
With most of your samples we're using `DummyUserDetailsService`
because there is not necessarily need to query a real user details
once kerberos authentication is successful and we can use kerberos
principal info to create that dummy user. However there is a way to
access kerberized LDAP services in a say way and query user details
from there.
`KerberosLdapContextSource` can be used to bind into LDAP via kerberos
which is at least proven to work well with Windows AD services.
[source,java,indent=0]
----
include::samples/KerberosLdapContextSourceConfig.java[tags=snippetA]
----
[TIP]
====
Sample <<samples-sec-server-win-auth>> is currently configured to
query user details from AD if authentication happen via kerberos.
====