-
Notifications
You must be signed in to change notification settings - Fork 34
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
Allow null expiresAt on group accessToken #162
Comments
Hey @andreufontb, This feature seams deprecated https://docs.gitlab.com/ee/update/deprecations.html#non-expiring-access-tokens
I've recently added new auth types that you can look into here: |
Hi @lacroi-m-insta, You are correct that non-expiring access tokens were deprecated in version 16.0. However, in the current release (17.4) — I previously mentioned 17.7 by mistake, which hasn't been released yet — there is now an option to allow non-expiring access tokens at the group or instance level. You can find more details in the release notes. If you have version 17.4 installed, you can configure this setting at the instance level by navigating to Admin Area → Settings → General, and then under Account and limit, you'll find a new checkbox for |
I see ! Thanks for the details. They probably had a lot of backlash from the community to re-introduce this insecure feature like that. I would be against it but I guess you could just handle this case by removing the I am not sure what the side effect would be |
I'm not a fan of using non-expiring tokens either. Do you think it's possible for Crossplane to detect expired tokens and automatically rotate them? |
That would be great for sure ! Technically it could be possible. But it seams that the other types of tokens dont have the refresh logic yet, we would need to add it there then add it here it would take a while. For the personal_acces_token case we would need to add a field to give an expiresAt value that is required here and that would then trigger a reconsile to patch the token field. |
Automatically rotating tokens would be awesome! |
What problem are you facing?
GitLab 17.7 introduced the ability to create group access tokens without an expiration date. However, this feature is not yet supported by the Crossplane GitLab provider.
How could Crossplane help solve your problem?
Update the
groups.gitlab.crossplane.io/v1alpha1
CRD to allow theexpiresAt
field inAccessToken
to accept a null value. While making an API call,expires_at
is still a required field, so it should be explicitly set to null when no expiration date is desired.Here is an example API call for creating an access token on a GitLab 17.7 instance:
The response looks like this:
The text was updated successfully, but these errors were encountered: