Expiration of passtickets
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 92
- Forks
- 81
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 46
Description
Passticket has a new value each second. It means it is unreasonable to generate it more often than in one second. The source code contains this expiration data that basically remove caching.
It is necessary to mention that pass tickets could be valid for up to 10mins.
The correct implementation should be something like:
long expiration = (System.currentTimeMillis() + 1000) % 1000;
//If the custom config value is there, then add the configured time
// generate passticket
return new PassTicketCommand(value, cookieName, patCookieName, expiration, customUserHeader, customPassTicketHeader, userId, passTicket);
It at least reduces the amount of parallel action to generate the same value, but the configurable value could significantly improve the treatment of a huge amount of requests.
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 in gateway-service/src/main/java/org/zowe/apiml/gateway/security/service/schema/HttpBasicPassTicketScheme.java at the expiration data around lines 115-116, and trace how the PassTicketCommand is generated. Check the existing pass-ticket generation and configuration paths before implementing expiration that avoids regenerating the same value more than once per second while supporting a configurable validity period up to 10 minutes; verify the behavior with relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, authentication
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 65/100