spring-projects / spring-projects/spring-ldap
doGetContext should use returned DirContext processContextAfterCreation
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 375
- Forks
- 501
- Avg merge
- 6h 4m
- Merged PRs (30d)
- 63
Description
to enable the startTLS to close the session.
One may want to use a org.springframework.ldap.core.support.AbstractTlsDirContextAuthenticationStrategy as authenticationStrategy, and set its shutdownTlsGracefully flag to true.
Now, calling authenticationStrategy.processContextAfterCreation from doGetContext should return a proxy DirContext which will hold
a TlsAwareDirContextProxy with the ldap context he had opend. calling to 'close' of the contex whould now call also to 'close' of the ldap context.
(This is needed when using ldap protocol with startTls. Some configurations reqiers the caller to shutdown Tls gracefully)
The returned DirContext proxy is now the one to be returned from doGetContext, and not ignored as before.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at doGetContext and trace how authenticationStrategy.processContextAfterCreation is currently called, using AbstractTlsDirContextAuthenticationStrategy and TlsAwareDirContextProxy as the relevant types. Done means the returned proxy DirContext is propagated from doGetContext so closing it also closes the LDAP context for graceful StartTLS shutdown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100