-
Notifications
You must be signed in to change notification settings - Fork 588
random callback uri port #1105
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
Comments
Hey @tuananh - I'm not sure I understand the use-case fully. How are you trying to run cosign? What fulcio instance are you pointed at, and how is it configured? |
@dlorenc i omit it so i assume it's the public dev one? the client i have registered in dex looks like below. staticClients:
- id: sigstore
secret: __CHANGE_ME__
name: 'sigstore'
# Where the app will be running.
redirectURIs:
- 'http://localhost:56921/auth/callback'
# - 'http://127.0.0.1:5555/callback' as you can see, the redirect uri has port in it but everytime i run the below command, the port changed so i got
|
👋 I ran into this when trying to get sigstore-the-hard-way up and running. I think this change in cosign is relevant, it changed the local server to bind to a random available port, to handle it already being taken on the developers machine. I'm not yet aware of a way to handle a random port range in dex. There's this fix proposed in dex but looks inactive: dexidp/dex#1783 |
The main issue is that certain OIDC providers do not allow to have a redirect URI to a random port (e.g. auth0). In. our code, we set a redirect listener where the port is randomly picked by the OS. As a consequence, those OIDC providers return a @dlorenc @tuananh A solution would be to expose a flag to set the listener of the redirect to a specific port or a redirect_uri itself. I could get some changes to fix it. |
The code is in: https://github.com/sigstore/sigstore/blob/main/pkg/oauthflow/interactive.go#L148, and even if the RFC8252 mentions
It seems some providers do not support it. |
@tuananh I've worked on adding the redirect uri's flag during the weekend. I need to run couple of additional tests, but I'll open a PR tomorrow. |
the url generated is localhost:xxxxx . however the port is random each time so it doesn't match with what i have register in oidc idp (dex) and i get this error when the url opened in browser
is there anyway to fix the port?
The text was updated successfully, but these errors were encountered: