Installing the VCF SSO Authentication Backend Module#
This guide will help you install and set up the VCF SSO authentication backend module in your Backstage instance.
Prerequisites#
Before installing, ensure you have:
- A working Backstage instance (version 1.47.1 or later)
- Node.js 18+ and Yarn installed
- Access to a VCF SSO OIDC endpoint
- An OIDC client application registered in VCF SSO with:
- A client ID and client secret
- The Backstage callback URL configured as a redirect URI
Obtaining VCF SSO OIDC Credentials#
To register an OIDC client in VCF SSO:
- Log in to your VCF SSO management interface
- Navigate to the OIDC client applications section
- Create a new OIDC client application
- Configure the redirect URI:
- Development:
http://localhost:7007/api/auth/vcfsso/handler/frame - Production:
https://backstage.example.com/api/auth/vcfsso/handler/frame - Note the Client ID, Client Secret, and the OIDC discovery URL (metadata URL)
The metadata URL typically follows the pattern:
https://<vcf-sso-host>/oidc/endpoint/<realm>
Installation Steps#
1. Add the Package#
Install the backend module package:
yarn --cwd packages/backend add @terasky/backstage-plugin-vcfsso-auth-backend
2. Register the Module in Your Backend#
Add the module to your backend:
// packages/backend/src/index.ts
backend.add(import('@terasky/backstage-plugin-vcfsso-auth-backend'));
Full example:
import { createBackend } from '@backstage/backend-defaults';
const backend = createBackend();
// Required: Core auth backend
backend.add(import('@backstage/plugin-auth-backend'));
// Add VCF SSO auth module
backend.add(import('@terasky/backstage-plugin-vcfsso-auth-backend'));
// ... other plugins
backend.start();
3. Set Environment Variables#
Store sensitive credentials as environment variables:
export VCFSSO_CLIENT_ID="your-client-id"
export VCFSSO_CLIENT_SECRET="your-client-secret"
For production deployments, configure these in your Kubernetes secrets or secret management system.
4. Add the Configuration#
Add the VCF SSO provider configuration to app-config.yaml:
auth:
environment: development
providers:
vcfsso:
development:
clientId: ${VCFSSO_CLIENT_ID}
clientSecret: ${VCFSSO_CLIENT_SECRET}
metadataUrl: https://vcf-sso.example.com/oidc/endpoint/VCFSSO
signIn:
resolvers:
- resolver: emailLocalPartMatchingUserEntityName
Replace the metadataUrl with the actual OIDC discovery endpoint for your VCF SSO instance.
5. Configure Sign-In Resolvers#
Add sign-in resolvers to map VCF SSO users to Backstage entities:
auth:
providers:
vcfsso:
development:
# ... credentials ...
signIn:
resolvers:
- resolver: emailLocalPartMatchingUserEntityName
- resolver: emailMatchingUserEntityProfileEmail
Backstage will try each resolver in order until one succeeds.
Verification#
After installation, verify that:
- The backend starts without errors
- The auth endpoint is accessible:
GET /api/auth/vcfsso - Navigating to the sign-in page shows the VCF SSO option (requires frontend plugin)
Test the Auth Endpoint#
curl http://localhost:7007/api/auth/vcfsso/start?env=development
This should return a redirect to your VCF SSO authorization page.
Troubleshooting#
Backend Won't Start#
- Verify the package is installed in
packages/backend/package.json - Ensure
@backstage/plugin-auth-backendis also installed - Check for TypeScript compilation errors
Authentication Fails#
- Verify
clientIdandclientSecretare correct - Ensure the
metadataUrlis reachable from the Backstage backend - Confirm the callback URL is registered in VCF SSO
- Check backend logs for detailed error messages
User Not Resolved#
- Verify the user entity exists in the Backstage catalog
- Check that the email in the
acctclaim matches the catalog user's email or name - Review resolver configuration and order
- Check backend logs for resolver errors
OIDC Discovery Fails#
- Confirm the
metadataUrlreturns valid JSON when accessed directly - Ensure no firewall or network policy blocks access from the backend to VCF SSO
- Check TLS certificate validity for the VCF SSO endpoint
Next Steps#
After successful installation:
- Proceed to the Configuration Guide for full configuration options
- Install the Frontend Plugin
- Configure the Sign-In Page to show the VCF SSO option