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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃殌 Feature: Use user gitlab token for register existing component (catalog import) #24764

Closed
2 tasks done
Yghore opened this issue May 14, 2024 · 4 comments
Closed
2 tasks done
Labels
area:catalog Related to the Catalog Project Area enhancement New feature or request

Comments

@Yghore
Copy link

Yghore commented May 14, 2024

馃敄 Feature description

You should add possibility of use user token for get yaml file into repository for registing existing component.

馃帳 Context

  • Avoid a static gitlab token
  • Use user repository permission for allow/deny add a component

鉁岋笍 Possible Implementation

app-config.production.yaml

catalog:
  rules:
    - allow: ["Component", "User", "Group"]
      useUserToken: true # true = user token, false = global token
      locations:
        - type: url
          pattern: https://gitlab.example.com/**

馃憖 Have you spent some time to check if this feature request has been raised before?

  • I checked and didn't find similar issue

馃彚 Have you read the Code of Conduct?

Are you willing to submit PR?

No, but I'm happy to collaborate on a PR with someone else

@Yghore Yghore added the enhancement New feature or request label May 14, 2024
@github-actions github-actions bot added the area:catalog Related to the Catalog Project Area label May 14, 2024
@Rugvip
Copy link
Member

Rugvip commented May 16, 2024

This could be nice, but it is hard to implement currently. The tricky part is that the user tokens will expire, so we really need to be storing and using the user refresh tokens for offline access, which we currently don't have any infra for.

I'm also a bit torn on whether it actually makes sense in practice. It seems like it would introduce issues for example with certain users being responsible for a lot of components, potentially leading to rate limiting issues because user tokens generally have lower rate limits than other types of integrations. It'd also be a problem to off-board users, where ingestion might suddenly start failing.

@Rugvip
Copy link
Member

Rugvip commented May 20, 2024

Some more info discussed as part of #24815: GitLab invalidates existing access and refresh tokens when any form of new session is created. That effectively means that this isn't possible to implement for GitLab in a clean way without requiring additional auth integrations.

@Yghore
Copy link
Author

Yghore commented May 21, 2024

Okay ! Thank you for your comeback.

@freben
Copy link
Member

freben commented May 23, 2024

Closing as responded to!

@freben freben closed this as completed May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:catalog Related to the Catalog Project Area enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants