Overview
The Satélite API uses a two-tier JWT token-based authentication system:- Microsoft Azure AD Token - Initial authentication using your organization’s Microsoft account
- Satélite Session Token - Internal API token generated after successful authentication
Authentication Flow
Token Requirements
Initial Authentication (Azure AD Token)
To authenticate with the Satélite API, you must first obtain a JWT token from Microsoft Azure AD. This token must:- Be a valid JWT token issued by your organization’s Azure AD
- Contain either a
unique_nameorupnclaim with the user’s email - Have an email domain of
@moderna.com.ec - Include a
nameclaim for user identification
Session Token (Satélite Token)
After successful authentication, the API generates a Satélite-specific JWT token with:- Expiration: 120 minutes (2 hours)
- Claims:
sub- User IDemail- User email addressrol- User role IDscopes- User permissions (e.g.,user:impersonate)
Required Headers
For authenticate Mutation
For All Other API Requests
After authentication, use the Satélite session token:- The
tokenfield of theSessionDTOresponse - The
satelite_sessionresponse header
User Auto-Creation
If a user with a valid@moderna.com.ec email authenticates for the first time:
- A new user account is automatically created
- The user’s name is extracted from the Azure AD token
- The user is marked as active by default
- The user must be assigned permissions by an administrator before gaining access
Permission System
Upon successful authentication, users receive:- Permissions (
Permisos) - List of assigned permissions for the user - Menu - Dynamically generated menu items based on permissions
- User Details - User profile information including role
- Token - JWT token for subsequent API requests
Special Permissions
- user:impersonate - Granted to users with “Vista Usuario” permission, allowing them to impersonate other users
Error Handling
The authentication system returns specific error codes:| Error Code | Description | When It Occurs |
|---|---|---|
UNAUTHORIZED | Invalid credentials | Token is missing, invalid, or email domain is not @moderna.com.ec |
UNAUTHORIZED | Account disabled | User account has been deactivated by an administrator |
UNAUTHORIZED | No role assigned | User exists but has no permissions assigned |
Security Considerations
- Token Storage: Store the Satélite session token securely (e.g., httpOnly cookies, secure storage)
- Token Refresh: Tokens expire after 2 hours. Re-authenticate when the token expires
- Email Validation: Only
@moderna.com.ecemail addresses are allowed - Active Status: Users can be deactivated by administrators at any time
- Permission Changes: Permission changes take effect after the next authentication
Next Steps
Authentication Mutations
View detailed documentation for the authenticate mutation
Authorization
Learn about role-based access control