Skip to content

Conversation

@Achiket123
Copy link

@Achiket123 Achiket123 commented Nov 28, 2025

resolves #1475

@Achiket123
Copy link
Author

Hey @golanglemonade can you review this. Also sorry for the delayed submission.

@golanglemonade golanglemonade added the run-ci used for forks for the CI to run label Nov 29, 2025
@golanglemonade
Copy link
Member

golanglemonade commented Nov 30, 2025

@Achiket123 Looks like there are some failing tests after changing the function; can you take a look?

@Achiket123
Copy link
Author

@golanglemonade please see this

@golanglemonade
Copy link
Member

@golanglemonade please see this

On my list; no need to keep rebasing. I just need to do some testing + verify if we need to have backwards compatibility. Should get to it later today or tomorrow

@Achiket123
Copy link
Author

@golanglemonade please see this

On my list; no need to keep rebasing. I just need to do some testing + verify if we need to have backwards compatibility. Should get to it later today or tomorrow

Sure, will be taking other issues.

// Get access token from the request, if not available then attempt to refresh
// using the refresh token cookie.
bearerToken, err := auth.GetBearerToken(c)
var bearerToken string
Copy link
Member

Choose a reason for hiding this comment

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

@Achiket123 It looks like you switch to GetBearerToken but then back to this - can you explain why? if it's an issue with the function and the new token format the underlying function in iam should be updated instead.

}

func isValidAPIToken(ctx context.Context, dbClient *ent.Client, token string) (*auth.AuthenticatedUser, string, error) {
t, err := fetchAPITokenFunc(ctx, dbClient, token)
Copy link
Member

Choose a reason for hiding this comment

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

I was thinking about the best way to roll this out with existing API Tokens and I think we need to have a fallback to the old format - to ensure existing API tokens work and can be migrated. This should mean that we check new format -> if its not the valid format with id + secret -> fallback to old checks -> then error

@sonarqubecloud
Copy link

sonarqubecloud bot commented Dec 6, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dbschema enhancement New feature or request graphapi graphqlschema run-ci used for forks for the CI to run

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature Request] Update API key generation to use HMAC

2 participants