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

Add GitHub OAuth config #511

Merged
merged 3 commits into from
Nov 26, 2024

Conversation

gaiksaya
Copy link
Member

Description

[Breaking Change]
This PR replaces runWithOidc parameter with authType to support multiple authTypes.
Defaults to whatever is written in baseJenkins.yaml.
With this change we now support github as auth mechanism.

Issues Resolved

related #506. Will close this issue once we officially adapt this parameter in internal deployments as well.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Comment on lines +79 to +88
const githubAuthConfig: { [x: string]: any; } = {
github: {
githubWebUri: 'https://github.com',
githubApiUri: 'https://api.github.com',
clientID: 'clientID',
clientSecret: 'clientSecret',
oauthScopes: 'read:org,user:email',
},
};
Copy link
Member Author

Choose a reason for hiding this comment

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

The huge diff is due to file name change. Actual diff only applies to these lines and last 5 files of this file.

Signed-off-by: Sayali Gaikawad <[email protected]>
@gaiksaya gaiksaya force-pushed the add-github-oauth-config branch from 0c0e133 to eb12990 Compare November 25, 2024 00:23
README.md Show resolved Hide resolved
lib/ci-stack.ts Show resolved Hide resolved
lib/ci-stack.ts Show resolved Hide resolved
lib/compute/auth-config.ts Show resolved Hide resolved
README.md Outdated
1. Run with parameter with one of the following (refer [this](#ssl-configuration) for value of `useSsL`) -
1. `npm run cdk deploy OpenSearch-CI-Dev -- -c runWithOidc=true -c useSsl=true` or,
1. `cdk deploy OpenSearch-CI-Dev -c runWithOidc=true -c useSsl=true`
1. `npm run cdk deploy OpenSearch-CI-Dev -- -c authType=oidc/github/default -c useSsl=true` or,
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: oidc|github|default

Copy link
Collaborator

Choose a reason for hiding this comment

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

Jenkins github is OIDC plugin right?

Copy link
Member Author

Choose a reason for hiding this comment

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

They define it as GitHub Auth plugin and it also has a config different that oidc in jenkins.yaml (configuration as code)

Signed-off-by: Sayali Gaikawad <[email protected]>
Signed-off-by: Sayali Gaikawad <[email protected]>
@gaiksaya gaiksaya merged commit fcb84d1 into opensearch-project:main Nov 26, 2024
3 checks passed
@gaiksaya gaiksaya deleted the add-github-oauth-config branch November 26, 2024 20:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ Done
Development

Successfully merging this pull request may close these issues.

3 participants