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

Set ouath user token expiration time to 365 days #991

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karelyatin
Copy link

With [1] it was attempted to set token expiration to infinite but as described in [2] with the config set to 0, token expiration is set to default i.e 24 hours. With this patch setting it to a larger value i.e 365 days.

[1] #332
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1959776
Related-Issue: #331

With [1] it was attempted to set token expiration to
infinite but as described in [2] with the config set
to 0, token expiration is set to default i.e 24 hours.
With this patch setting it to a larger value i.e 365 days.

[1] crc-org#332
[2] https://bugzilla.redhat.com/show_bug.cgi?id=1959776
Related-Issue: crc-org#331
@openshift-ci openshift-ci bot requested review from cfergeau and gbraad December 13, 2024 12:12
Copy link

openshift-ci bot commented Dec 13, 2024

Hi @karelyatin. Thanks for your PR.

I'm waiting for a crc-org member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Copy link
Collaborator

@gbraad gbraad left a comment

Choose a reason for hiding this comment

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

Is there a way to test this is actually set to a full year, after the deployment?

@karelyatin
Copy link
Author

karelyatin commented Dec 13, 2024

Is there a way to test this is actually set to a full year, after the deployment?

I did checked locally by manually patch oauth cluster config

$ oc get oauth cluster -o jsonpath="{.spec.tokenConfig}"
{"accessTokenMaxAgeSeconds":31536000}
$ oc get useroauthaccesstokens sha256~veewdhtbEbMsLFJa0D-eYbbKnswcpisjeGmBx4cfnFU
NAME                                                 CLIENT NAME                    CREATED   EXPIRES                         REDIRECT URI                                                    SCOPES
sha256~veewdhtbEbMsLFJa0D-eYbbKnswcpisjeGmBx4cfnFU   openshift-challenging-client   56m       2025-12-13 11:48:42 +0000 UTC   https://oauth-openshift.apps-crc.testing/oauth/token/implicit   user:full

@gbraad
Copy link
Collaborator

gbraad commented Dec 13, 2024

Ideally, an automated test would need to be added. @wdyt, @praveenkumar @lilyLuLiu ?

@praveenkumar
Copy link
Member

/ok-to-test

@praveenkumar
Copy link
Member

Ideally, an automated test would need to be added. @wdyt, @praveenkumar @lilyLuLiu ?

We don't need any specific test for this because if it expire user can login again and regenerate but I think @karelyatin is right about current state of this one (only having 24 hour expire time).

@praveenkumar
Copy link
Member

/lgtm

@praveenkumar
Copy link
Member

/cherry-pick release-4.17

@openshift-cherrypick-robot

@praveenkumar: once the present PR merges, I will cherry-pick it on top of release-4.17 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.17

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@praveenkumar
Copy link
Member

/cherry-pick release-4.18

@openshift-cherrypick-robot

@praveenkumar: once the present PR merges, I will cherry-pick it on top of release-4.18 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.18

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@praveenkumar
Copy link
Member

/approve

Copy link

openshift-ci bot commented Dec 13, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: praveenkumar

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Copy link

openshift-ci bot commented Dec 13, 2024

@karelyatin: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-microshift 03e5c6b link true /test e2e-microshift

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here.

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

Successfully merging this pull request may close these issues.

4 participants