Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arc 2745 fix exp time #2613

Closed
wants to merge 2 commits into from
Closed

Arc 2745 fix exp time #2613

wants to merge 2 commits into from

Conversation

gxueatlassian
Copy link
Contributor

@gxueatlassian gxueatlassian commented Dec 13, 2023

What's in this PR?
Add ff to reduce the app token exp time

Why
TEN MINUTES is the max allowed, prone to error

Added feature flags
app-token-exp-in-milli-sec

Affected issues
ARC-2745

How has this been tested?
Unit test

Whats Next?

@gxueatlassian gxueatlassian requested a review from a team as a code owner December 13, 2023 03:59
@@ -36,7 +37,7 @@ export const GHESVerifyGetApps = async (req: Request, res: Response): Promise<vo
const output = await runCurl({
fullUrl: `${gitHubAppClient.restApiUrl}/app`,
method: "GET",
authorization: `Bearer ${AppTokenHolder.createAppJwt(await app.getDecryptedPrivateKey(installation.jiraHost), String(app.appId)).token}`
authorization: `Bearer ${AppTokenHolder.createAppJwt(await app.getDecryptedPrivateKey(installation.jiraHost), String(app.appId), FIVE_MINUTES_IN_MILLI_SEC).token}`
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are we not feature flagging this too?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I realize that this is for the API endpoints that we use, but we can't test the exp time set in FF from this endpoint , can we?
So if the customer is still facing this issue, we can't test the value in the FF through this endpoint cause its set to 5 minutes.

@gxueatlassian
Copy link
Contributor Author

I don't like my PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants