cloudfoundry / cloudfoundry/stratos
Clean up session expiry time
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 267
- Forks
- 137
- Avg merge
- 5h 14m
- Merged PRs (30d)
- 77
Description
- there's a mismatch in where the session expiration time is stored
- the initial value is automatically generated and stored via
expiresOn := time.Now().Add(time.Second * time.Duration(session.Options.MaxAge)) session.Values["expires_on"] = expiresOn - auth providers (uaa, local, non) will provide a value in
sessionValues["exp"], - when returned to user
expis ignored in favour ofexpires_on(seehandleSessionExpiryHeader)
- the initial value is automatically generated and stored via
- there should be a way for the authentication mode to set the session expiry time
- not sure it's as simple as making sure
expandexpires_onare the same
- not sure it's as simple as making sure
- TODO allow session.Options.MaxAge to be set via env var
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 by tracing the session expiry initialization, the auth providers' sessionValues["exp"], and handleSessionExpiryHeader. Determine how authentication modes should control expiry and how session.Options.MaxAge should be configured from an environment variable. Done means the storage and returned expiry behavior are consistent for each authentication mode, with coverage for the relevant cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100