Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@backstage/plugin-auth-backend
Advanced tools
A Backstage backend plugin that handles authentication
WORK IN PROGRESS
This is the backend part of the auth plugin.
It responds to auth requests from the frontend, and fulfills them by delegating to the appropriate provider in the backend.
Choose your OAuth Providers, replace x
with actual value and then start backend:
Example for Google OAuth Provider at root directory:
export AUTH_GOOGLE_CLIENT_ID=x
export AUTH_GOOGLE_CLIENT_SECRET=x
yarn --cwd packages/backend start
export AUTH_GOOGLE_CLIENT_ID=x
export AUTH_GOOGLE_CLIENT_SECRET=x
Follow this link, Create new OAuth App.
backstage-dev
or something along those lines.http://localhost:7007/api/auth/github/handler/frame
for local development.http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/github/handler/frame
for non-local deployments.export AUTH_GITHUB_CLIENT_ID=x
export AUTH_GITHUB_CLIENT_SECRET=x
For GitHub Enterprise:
export AUTH_GITHUB_CLIENT_ID=x
export AUTH_GITHUB_CLIENT_SECRET=x
export AUTH_GITHUB_ENTERPRISE_INSTANCE_URL=https://x
Follow this link, Add new application.
backstage-dev
or something along those lines.http://localhost:7007/api/auth/gitlab/handler/frame
for local development.http://{APP_FQDN}:{APP_BACKEND_PORT}/api/auth/gitlab/handler/frame
for non-local deployments.read_user
Grants read-only access to the authenticated user's profile through the /user API endpoint, which includes username, public email, and full name. Also grants access to read-only API endpoints under /users.read_repository
Grants read-only access to repositories on private projects using Git-over-HTTP (not using the API).write_repository
Grants read-write access to repositories on private projects using Git-over-HTTP (not using the API).openid
Grants permission to authenticate with GitLab using OpenID Connect. Also gives read-only access to the user's profile and group memberships.profile
Grants read-only access to the user's profile data using OpenID Connect.email
Grants read-only access to the user's primary email address using OpenID Connect.export GITLAB_BASE_URL=https://gitlab.com
export AUTH_GITLAB_CLIENT_ID=x # GitLab calls this the Application ID
export AUTH_GITLAB_CLIENT_SECRET=x
If you have GitLab Enterprise, perform the steps above, replacing gitlab.example.com
in the following
with the domain of your GitLab Enterprise host:
Create new application at: https://gitlab.example.com/profile/applications
.
export GITLAB_BASE_URL=https://gitlab.example.com
export AUTH_GITLAB_CLIENT_ID=x # GitLab calls this the Application ID
export AUTH_GITLAB_CLIENT_SECRET=x
Add a new Okta application using the following URI conventions:
Login redirect URIs: http://localhost:7007/api/auth/okta/handler/frame
Logout redirect URIs: http://localhost:7007/api/auth/okta/logout
Initiate login URIs: http://localhost:7007/api/auth/okta/start
Then configure the following environment variables to be used in the app-config.yaml
file:
export AUTH_OKTA_AUDIENCE=https://example.okta.com
export AUTH_OKTA_CLIENT_ID=x
export AUTH_OKTA_CLIENT_SECRET=x
export AUTH_AUTH0_DOMAIN=x
export AUTH_AUTH0_CLIENT_ID=x
export AUTH_AUTH0_CLIENT_SECRET=x
An Azure AD App Registration is required to be able to sign in using Azure AD and the Microsoft Graph API. Click here to create a new one.
New Registration
button.backstage-dev
Accounts in this organizational directory only
under supported account types.http://localhost:7007/api/auth/microsoft/handler/frame
https://{APP_FQDN}:{APP_BACKEND_PORT}/auth/microsoft/handler/frame
Register
.We also need to generate a client secret so Backstage can authenticate as this app.
Certificates & secrets
menu item.Client secrets
, click on New client secret
.auth-backend-plugin
1 Year
, 2 Years
or Never
.Add
.The secret value will then be displayed on the screen. You will not be able to retrieve it again after leaving the page.
cd packages/backend
export AUTH_MICROSOFT_CLIENT_ID=x
export AUTH_MICROSOFT_CLIENT_SECRET=x
export AUTH_MICROSOFT_TENANT_ID=x
yarn start
To try out SAML, you can use the mock identity provider:
./scripts/start-saml-idp.sh
If you need to change Backstage token expiration from the default value of one hour you can do so through configuration. Note that this is not the session duration, but rather the duration that the short-term cryptographic tokens are valid for. The expiration can not be set lower than 10 minutes or above 24 hours.
This is what the configuration looks like:
auth:
backstageTokenExpiration: { minutes: <user_defined_value> }
FAQs
A Backstage backend plugin that handles authentication
The npm package @backstage/plugin-auth-backend receives a total of 46,933 weekly downloads. As such, @backstage/plugin-auth-backend popularity was classified as popular.
We found that @backstage/plugin-auth-backend demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.