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

Test SAML integration #645

Closed
christophe-f opened this issue Oct 23, 2023 · 4 comments
Closed

Test SAML integration #645

christophe-f opened this issue Oct 23, 2023 · 4 comments

Comments

@christophe-f
Copy link
Contributor

What needs to be done?

Test that Showcase is working with SAML

https://github.com/backstage/backstage/blob/b1f4c99f79f2640ae3f12139923850c47f61aa4c/plugins/auth-backend/scripts/start-saml-idp.sh

@Zaperex
Copy link
Member

Zaperex commented Oct 23, 2023

Currently SAML is not supported in the showcase because the showcase does not have the SAML auth provider setup.
https://backstage.io/docs/reference/plugin-auth-backend.providers/
image

We also currently don't have a specific sign-in page for SAML yet, which would require a custom apiRef and sign-in configuration like the following:

{
  id: 'saml-auth-provider',
  title: 'SAML',
  message: 'Sign in using SAML',
  apiRef: samlAuthApiRef,
},
export const samlAuthApiRef: ApiRef<
  OAuthApi &
    OpenIdConnectApi &
    ProfileInfoApi &
    BackstageIdentityApi &
    SessionApi
> = createApiRef({
  id: 'internal.auth.saml',
});

Then we would register the API similar to how @schultzp2020 registered the OIDC apiRef in #602 in packages/app/src/api/AuthApiRefs.ts

// SAML
export const apis: AnyApiFactory[] = [
  ...
  createApiFactory({
    api: samlAuthApiRef,
    deps: {
      discoveryApi: discoveryApiRef,
      oauthRequestApi: oauthRequestApiRef,
      configApi: configApiRef,
    },
    factory: ({ discoveryApi, oauthRequestApi, configApi }) =>
      OAuth2.create({
	discoveryApi,
	oauthRequestApi,
	provider: {
	  id: 'saml',
	  title: 'SAML',
	  icon: () => null,
	},
	environment: configApi.getOptionalString('auth.environment'),
      }),
  }),
];

The users would then need to also configure the saml provider in the auth.providers section of the app-config.yaml according to the schema specified by the config.d.ts which currently doesn't have much documentation on what's expected as inputs.

@schultzp2020
Copy link
Member

@christophe-f @Zaperex I will add saml support in #602.

@Zaperex
Copy link
Member

Zaperex commented Oct 30, 2023

Currently blocked by #602 and #588

@Zaperex
Copy link
Member

Zaperex commented Nov 9, 2023

Verified and the SAML sign-in works as expected.

@Zaperex Zaperex closed this as completed Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants