Java SPNEGO Authentication & Kerberos Constrained Delegation (KCD) to backend service

前端 未结 2 1911
梦毁少年i
梦毁少年i 2020-11-29 12:30

I have a Java web application which do SPNEGO authentication of clients in a Windows Active Directory environment. To authenticate the user we use code from the good old SPN

2条回答
  •  萌比男神i
    2020-11-29 13:21

    I've actually been doing something like this recently but am using spring security kerberos. I put an example on github here. The key thing that I found that I needed set up to use constrained delegation like you want it and S4U2Proxy was to make sure (if you're using Oracle/OpenJDK) you set isInitiator=true in your JAAS Config so that when getDelegCred is called you get back a Krb5ProxyCredential. See comment here. With that credential, you can use it to create service ticket tokens on the Users behalf for the services you are constrained to use in the normal fashion, like this.

提交回复
热议问题