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

fake_auth: fix fakeidp jwt usage, take Url for issuer #122

Conversation

colemickens
Copy link
Member

Update for changes for internal flakehub testing.

I dropped the env var / special handling. We really shouldn't be allowing this to be overriden in actions (and in fact, we already don't have a action-variable for it).

Leaving as draft, it targets the refactor branch and should co-merge with the backend change.

@colemickens colemickens force-pushed the colemickens/change-fakeauth-handling branch from 7599fba to 2968e46 Compare April 19, 2024 14:54
pub(crate) jwt_issuer_uri: OptionString,

/// URL of a JWT mock server (like https://github.com/spectare/fakeidp) which can issue tokens.
pub(crate) jwt_issuer_uri: Option<url::Url>,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
pub(crate) jwt_issuer_uri: Option<url::Url>,
#[clap(long)]
pub(crate) jwt_issuer_uri: Option<url::Url>,

otherwise it needs to be passed as an argument

@@ -3,7 +3,7 @@ use color_eyre::eyre::{Context, Result};
use crate::github::graphql::GithubGraphqlDataResult;

pub async fn get_fake_bearer_token(
jwt_issuer_uri: &str,
jwt_issuer_uri: &url::Url,
Copy link
Member

Choose a reason for hiding this comment

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

Need to use this to set the iss claim

@colemickens colemickens merged commit 2968e46 into colemickens/refactor-for-gitlab May 8, 2024
5 checks passed
@colemickens colemickens deleted the colemickens/change-fakeauth-handling branch May 8, 2024 14:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants