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

Allow usage of personal access tokens besides JWT Profile #115

Open
fforootd opened this issue Jul 21, 2022 · 6 comments
Open

Allow usage of personal access tokens besides JWT Profile #115

fforootd opened this issue Jul 21, 2022 · 6 comments

Comments

@fforootd
Copy link
Member

I think we should also allow to use PATs with this library and not only JWT profile.

@fforootd fforootd added enhancement New feature or request help wanted Extra attention is needed go Pull requests that update Go code labels Jul 21, 2022
@fforootd fforootd added this to Kanban Jul 21, 2022
@fforootd
Copy link
Member Author

@hifabienne @livio-a FYI

@hifabienne hifabienne moved this to Backlog in Kanban Aug 16, 2022
@hifabienne hifabienne removed enhancement New feature or request help wanted Extra attention is needed go Pull requests that update Go code priority: medium labels Dec 29, 2022
@hifabienne hifabienne removed this from Kanban Dec 29, 2022
@hifabienne hifabienne moved this to 📨 Product Backlog in Product Management Dec 29, 2022
@MinDBreaK
Copy link

Hello,
Is there any workaround while this is implemented ?

@fforootd
Copy link
Member Author

Hello, Is there any workaround while this is implemented ?

No not ATM, but out of curiosity what is hindering you to use a keyfile (the json zitadel generates for you)?

@MinDBreaK
Copy link

MinDBreaK commented Nov 15, 2023

I am using the access token of a user to retrieve the list of the organizations it has access to, but I need to introspect the token.
I might have missed the API that allow the inspection of another token ?

Probably the same as #186 I think, with the PR linked

@fforootd
Copy link
Member Author

I am using the access token of a user to retrieve the list of the organizations it has access to, but I need to introspect the token. I might have missed the API that allow the inspection of another token ?

Probably the same as #186 I think, with the PR linked

The introspection endpoint needs a client authentication, in zitadel called an "api client" which will give you a json with a private key.

IMO it should be sufficient to setup the api client json (as key) and then to pass the token you have from the user to the sdk.

Somewhat like in this example https://github.com/zitadel/zitadel-go/blob/main/example/http/http.go

@MinDBreaK
Copy link

I need to execute request against Zitadel API with the context of the user. I'm using it's PAT to do this.
I went with the solution mentioned in #212 (comment)

This is fine by me, But I think maybe some methods could be renamed as we are not exactly using "JWT" to access the API.

The keyfile could be used, but I would also like the ability to use env vars for example (unrelated issue)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 📨 Product Backlog
Development

No branches or pull requests

3 participants