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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃檹 Help Wanted: Auth Backend Module Migrations #19476

Open
16 of 19 tasks
Rugvip opened this issue Aug 21, 2023 · 41 comments
Open
16 of 19 tasks

馃檹 Help Wanted: Auth Backend Module Migrations #19476

Rugvip opened this issue Aug 21, 2023 · 41 comments
Labels
auth backend enhancement New feature or request good first issue Good for newcomers help wanted Help/Contributions wanted from community members

Comments

@Rugvip
Copy link
Member

Rugvip commented Aug 21, 2023

The auth backend recently introduced a new architecture as it was migrated to support the new backend system in #19280. The new architecture implements the auth provider specific logic as "authenticators". There are currently two different kinds of authenticators, OAuth and proxy, along with accompanying route handlers and provider factories.

As part of this we also move all auth providers to be separate modules, and then use that new module for the implementation in auth-backend for backwards compatibility.

Process

For any given OAuth provider implementation, the following is a good starting point for migrating any provider:

  1. Duplicate the plugins/auth-backend-module-gitlab-provider directory to plugins/auth-backend-module-<provider-id>-provider
  2. Case sensitive search and replace all occurrences of GitLab with <ProviderName>, use the name of the provider as it appears in text.
  3. Case sensitive search and replace all occurrences of Gitlab with <ProviderId>, use the PascalCase version of the provider name as it appears in code, this might be the same as the previous step.
  4. Case sensitive search and replace all occurrences of gitlab with <providerId>, use the camelCase version of the provider name as it appears in code.
  5. Now passport strategy and any other provider-specific logic and configuration from plugins/auth-backend/src/providers/<providerId>/provider.ts. If there are tests for this specific logic then you can migrate those to authenticator or module tests, but other than that the existing provider tests can be deleted. If there are particular tests that you would like too keep, check if it makes sense to add them to https://github.com/backstage/backstage/blob/master/plugins/auth-node/src/oauth/createOAuthRouteHandlers.test.ts.
  6. Update config.d.ts in the new module, move over and remove any related configuration in plugins/auth-backend/config.d.ts.
  7. Now refactor plugins/auth-backend/src/providers/<providerId> to use the new module, adding a dependency for the new module to auth-backend. Use the legacy helpers as shown in #19475, do not add additional resolvers, options, or other API.

The process for migrating a proxy provider is similar, but use plugins/auth-backend-module-gcp-iap-provider as a starting point instead.

Migration Status

This is the current migration status of all auth providers that need migration. Let us know if you want to help out! 馃檹

@Rugvip Rugvip added enhancement New feature or request good first issue Good for newcomers help wanted Help/Contributions wanted from community members backend auth labels Aug 21, 2023
@mihrab34
Copy link

Hi @Rugvip I'd like to help out

@IvyJeptoo
Copy link

Hello @Rugvip I'd also want to help

@Rugvip
Copy link
Member Author

Rugvip commented Aug 22, 2023

@mihrab34 @IvyJeptoo great! 馃帀 Best pick a single provider to start with

@mihrab34
Copy link

@Rugvip I'm having this error when i try yarn install after forking & cloning the project

yarn install error

@awanlin
Copy link
Collaborator

awanlin commented Aug 24, 2023

@Rugvip, can we put a hold on the Microsoft auth provider? I'm wondering if now is a good time to rename it. We use Azure in most places and this is one of the only places we call something Microsoft (that I'm aware of could be wrong). I can put together an RFC to get feedback on this if you think that's needed. CC @sanderaernouts @afscrome

@Rugvip
Copy link
Member Author

Rugvip commented Aug 24, 2023

@awanlin yep we could easily do a rename when creating the new module 馃憤 Let's not ship any new module before we have settled on the name.

I'd say though that from my understanding "Microsoft" actually makes sense. I find it to be similar to Google auth, where the auth itself if managed through GCP and gives access to a lot of GCP resources, but the scope in the end is much broader than just GCP, so it's the "Google" provider.

@Rugvip
Copy link
Member Author

Rugvip commented Aug 24, 2023

@mihrab34 seems like there's an issue with the isolated-vm installation, most likely you'll want to have a look at https://github.com/laverdet/isolated-vm#requirements and make sure that's covered for your OS

@TheGemmell
Copy link
Contributor

@awanlin @Rugvip I'm happy to spend some time doing the Microsoft provider, I think we should keep it as Microsoft, purely because they're rolling Azure AD into Entra ID in the coming months AFAIK

@afscrome
Copy link
Contributor

afscrome commented Aug 24, 2023

@awanlin A month of two ago, I'd definitely have said to rename to azure, however Microsoft have now decided to rename Azure Active Directory to Microsoft Entra Id 馃う https://devblogs.microsoft.com/identity/aad-rebrand

I do think the Microsoft / Azure integrations as a whole could do with a naming check as there are a few naming inconsistencies. (e.g. some of the Azure Devops integrations are just named azure, even though ADO is separate to Azure).

@awanlin
Copy link
Collaborator

awanlin commented Aug 24, 2023

Alright, that works for me, also forgot about the whole name change for Azure AD. Then feel free to work on this who every wants!

Thanks for the feedback @Rugvip @TheGemmell @afscrome 馃憤

@IvyJeptoo
Copy link

@Rugvip I just wanted to ask if it possible if we can mention the modules that each will be handling so that two people dont work on the same module(just a suggestion)

@Rugvip Rugvip pinned this issue Aug 26, 2023
@Rugvip
Copy link
Member Author

Rugvip commented Aug 27, 2023

@IvyJeptoo yep makes sense, done

@awanlin
Copy link
Collaborator

awanlin commented Aug 28, 2023

I'll be running with oauth2 as this is something we need internally 馃憤

@mihrab34
Copy link

@Rugvip I opened a PR for bitbucket on #19665

@ekafeel
Copy link

ekafeel commented Aug 30, 2023

I will take the auth0

@awanlin
Copy link
Collaborator

awanlin commented Aug 31, 2023

PR for the oauth2 provider is here: #19696

@RubenV-dev
Copy link
Contributor

I will be working on the oidc migration

@ahhhndre
Copy link
Contributor

@TheGemmell what鈥檚 the ETA on the Microsoft auth module? This is blocking us from using the new backend system

@TheGemmell
Copy link
Contributor

@ahhhndre
Apologies, I actually finished the code changes, then had to go on leave for an emergency. Got back and had forgotten about it. I'll test and raise a PR by end of the weekend

@TheGemmell
Copy link
Contributor

PR for microsoft provider is here: #20120

@awanlin
Copy link
Collaborator

awanlin commented Sep 23, 2023

Oh wow, hope everything is fine now @TheGemmell? That's for sure a more important priority but thanks for submitting the PR!

@jamieklassen
Copy link
Member

PR for oidc: #20282

@guibes
Copy link

guibes commented Oct 3, 2023

Hello, will be my first open source contribution, I can make for atlassian. I'll use some open PR to check how to make it easier.

@Josh-Uvi
Copy link
Contributor

Hi @Rugvip, I opened a PR for the Okta Provider - #20854.

@handsamtw
Copy link
Contributor

handsamtw commented Nov 6, 2023

Hi @Rugvip , this is my first open-source contribution, and I am very happy help out!

I opened a PR for the Atlassian Provider - #21007 , but there're some yarn install pipeline issue i haven't figured out, would you mind taking a look? Thank you so much!

@Parsifal-M
Copy link
Contributor

Is anyone looking at the aws-alb one? If not, I may take a shot at this one. 馃憤

@tudi2d
Copy link
Member

tudi2d commented Nov 30, 2023

doesn't look like it - go for it, @Parsifal-M!

@GuptaNavdeep1983
Copy link
Contributor

@Parsifal-M, could you make some progress on aws-alb one? I did not realize that somebody is already working on it and started spending some time. Nevertheless, let me know if I can help as we use that one.

@Parsifal-M
Copy link
Contributor

@Parsifal-M, could you make some progress on aws-alb one? I did not realize that somebody is already working on it and started spending some time. Nevertheless, let me know if I can help as we use that one.

Hey!

I had planned to start this weekend! But if you've already made progress that's fine! I will hold off for now 鉁岋笍

Could you tag me in the PR so I can also take a look once it's ready? I'm quite curious about it 馃憣

Thanks for the heads up!

@minkimcello
Copy link
Contributor

Looking at the auth-backend changelog, looks like oauth2-proxy, microsoft, and atlassian has been refactored?

@GuptaNavdeep1983
Copy link
Contributor

GuptaNavdeep1983 commented Dec 11, 2023

Hi @Rugvip, @Parsifal-M I opened a PR for AWS ALB provider - #21810

@GuptaNavdeep1983
Copy link
Contributor

@Rugvip Is there anything else I can do on this PR #21810?

@hasson82
Copy link

Hi, I'm willing to take azure-easyauth.

@yaegashi
Copy link
Contributor

@hasson82 Have there been any updates regarding the azure-easyauth migration on your side?

I鈥檓 currently working on setting up DevOps for Backstage on Azure Container Apps and have ported azure-easyauth to the new backend system for internal use, as it has become the default configuration in Backstage v1.24.0.

https://github.com/yaegashi/dx2devops-backstage-containerapp

@yaegashi
Copy link
Contributor

I'm working on the new azure-easyauth auth provider: #23909

The migration in the older provider is not yet implemented but coming soon. Any comments or suggestions would be appreciated.

@salemgolemugoo
Copy link

salemgolemugoo commented Apr 9, 2024

Anyone can pick up Onelogin and/or JumpCloud please?

@freben
Copy link
Member

freben commented Apr 11, 2024

I made one for cfaccess #23997

pjungermann added a commit to Bonial-International-GmbH/backstage that referenced this issue Apr 16, 2024
Migrate the Bitbucket auth provider to the new `@backstage/plugin-auth-backend-module-bitbucket-provider` module package.

Relates-to: backstage#19476
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
pjungermann added a commit to Bonial-International-GmbH/backstage that referenced this issue Apr 16, 2024
Migrate the Bitbucket auth provider to the new `@backstage/plugin-auth-backend-module-bitbucket-provider` module package.

Relates-to: backstage#19476
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
pjungermann added a commit to Bonial-International-GmbH/backstage that referenced this issue Apr 16, 2024
Migrate the Bitbucket auth provider to the new `@backstage/plugin-auth-backend-module-bitbucket-provider` module package.

Relates-to: backstage#19476
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
pjungermann added a commit to Bonial-International-GmbH/backstage that referenced this issue Apr 16, 2024
Migrate the Bitbucket auth provider to the new `@backstage/plugin-auth-backend-module-bitbucket-provider` module package.

Relates-to: backstage#19476
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
pjungermann added a commit to Bonial-International-GmbH/backstage that referenced this issue Apr 16, 2024
Migrate the Bitbucket auth provider to the new `@backstage/plugin-auth-backend-module-bitbucket-provider` module package.

Relates-to: backstage#19476
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
pjungermann added a commit to Bonial-International-GmbH/backstage that referenced this issue Apr 16, 2024
Migrate the Bitbucket auth provider to the new `@backstage/plugin-auth-backend-module-bitbucket-provider` module package.

Relates-to: backstage#19476
Signed-off-by: Patrick Jungermann <Patrick.Jungermann@gmail.com>
@matteosilv
Copy link
Contributor

matteosilv commented Apr 18, 2024

Anyone can pick up Onelogin and/or JumpCloud please?

I started taking a look at OneLogin, but I don't know how much effort I can put on it:

#24353

@matteosilv
Copy link
Contributor

Made progresses with OneLogin impl. If anybody wants to review, I think is pretty much ready

@JeevaRamanathan
Copy link
Contributor

JeevaRamanathan commented May 2, 2024

Hi, is bitbucketServer based on OAuth provider

@Rugvip
Copy link
Member Author

Rugvip commented May 2, 2024

@JeevaRamanathan yes it is, the current implementation is over here:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auth backend enhancement New feature or request good first issue Good for newcomers help wanted Help/Contributions wanted from community members
Projects
None yet
Development

No branches or pull requests