Use Cases
Below are practical examples of how GuardianKey Auth Bastion Enterprise can be configured for different web system protection scenarios. Each use case provides a brief description, the protection objective, the expected authentication flow, and recommended bastion settings.
β οΈ Important: Each implementation may vary according to the technical characteristics of the protected system. The GuardianKey Customer Success team is available to support configuration and integration decisions.
Table of Contentsβ
- Use Cases
- Table of Contents
- π§© Case 1: System with email-based login (2FA with TOTP)
- π§© Case 2: System with username different from email (2FA with credential validation)
- π§© Case 3: Authentication with GovBR (CPF as identifier)
- π§© Case 4: API-only integration (without GDN panel)
- π§© Case 5: Multiple systems on the same domain with shared users
- π§© Case 6: User with custom policy (whitelist or special TTL)
- π§© Case 7: Policy by IP (allowing trusted networks)
- π Conclusion
π§© Case 1: System with email-based login (2FA with TOTP)β
Descriptionβ
Web system where the user authenticates with email and password. The goal is to protect access by adding two-factor authentication (2FA) with TOTP (e.g., Google Authenticator).
Objectiveβ
Add MFA before the login form, without changing the system.
Flowβ
User accesses /login β Bastion requires TOTP β If valid, shows form β Authentication in the system
Bastion Configurationβ
- Auth Type: TOTP
- Registration Method: email
- Token Path: /login
- Token TTL: 3600
- User Pool: optional
- Backends: http://10.0.0.10:8080
π Tip: No external API is needed, as the bastion uses the email as the main identifier.
π§© Case 2: System with username different from email (2FA with credential validation)β
Descriptionβ
System where login uses a custom identifier (e.g., registration number, nickname, etc.). 2FA protection will use TOTP, but the bastion needs to validate the user's identity to allow second factor registration.
Objectiveβ
Protect access with MFA and validate identity before registering 2FA.
Flowβ
Bastion Configurationβ
- Auth Type: TOTP
- Registration Method: credentials
- Token Path: /login
- Token TTL: 3600
- Data Integration Endpoint - Auth: https://sistema.local/api/validate-login
- User Pool: optional
π Tip: The bastion will observe the original login response to check if the credentials are correct. The API can return 200 OK
or a specific field in the response body.
π§© Case 3: Authentication with GovBR (CPF as identifier)β
Descriptionβ
Public web system where login is based on CPF. The goal is to replace local login with authentication via GovBR (OAuth2).
Objectiveβ
Use GovBR federated identity as the main authentication method.
Flowβ
User accesses system β Bastion displays "Login with GovBR" button β Login via OAuth2 β CPF received β Redirect to authenticated application
Bastion Configurationβ
- Auth Type: GovBR
- Registration Method: Disabled
- GovBR Integration:
- Client ID / Secret / Endpoint provided by GovBR
- Customizable JavaScript for button injection
- Token TTL: 3600
- User Pool: optional
π Requirement: The protected system must have the user's CPF for post-login correlation.
π§© Case 4: API-only integration (without GDN panel)β
Descriptionβ
Corporate environment that manages users and 2FA exclusively via REST API, without using the bastion's graphical interface.
Objectiveβ
Automate 2FA provisioning and validation directly in the backend.
Flowβ
System calls API /register-user β User receives TOTP key β App reads QR Code β Validates code via API /verify β Access granted
Endpoints used (fictitious example)β
- POST
/api/users/register
{ "username": "joao", "email": "[email protected]" }
- GET
/api/users/joao/totp
β Returns QR Code - POST
/api/users/joao/verify
{ "totp": "123456" }
Bastion Configurationβ
- Auth Type: TOTP
- Registration Method: API
- Data Integration Endpoint - Auth: https://meusistema.local/api/verify
- User Pool: required (for correlation via API)
- Panel: not used in this scenario
π Note: Ideal for systems with their own panel or integration with existing portals.
π§© Case 5: Multiple systems on the same domain with shared usersβ
Descriptionβ
Company with several systems hosted under the same domain (e.g., /erp, /hr, /portal) and wants to protect all with shared 2FA.
Objectiveβ
Apply MFA to multiple services reusing the user base.
Flowβ
User accesses /erp/login β Bastion validates TOTP β Redirects to ERP
User accesses /hr/login β TOTP already active β Redirects directly
Bastion Configurationβ
- Create an authgroup per system (e.g., ERP, HR, Portal).
- Use the same User Pool for all.
- Define specific Token TTL and Token Path per system.
- Configure Backend per service.
π Tip: The 2FA token can be reused while within the TTL.
π§© Case 6: User with custom policy (whitelist or special TTL)β
Descriptionβ
Scenario where a specific user must have different behavior from others, such as:
- 2FA exemption (whitelist).
- Session with extended TTL.
Objectiveβ
Apply granular control based on user profile.
Bastion Configurationβ
- Access User Policies.
- Add a new row:
- Authgroup: Portal
- Username: admin01
- Action: Whitelist or Token TTL = 14400 (4h)
π Note: IP policies (IP Policies) take precedence over user policies.
π§© Case 7: Policy by IP (allowing trusted networks)β
Descriptionβ
Company wants to exempt 2FA requirement for accesses originating from an internal network or trusted fixed IP.
Objectiveβ
Reduce friction for internal users while maintaining external security.
Bastion Configurationβ
- Access IP Policies.
- Add a new row:
- Authgroup: Intranet
- CIDR: 192.168.0.0/24
- Action: Whitelist
π Best practice: Combine with Firewalling to restrict countries of origin and strengthen external security.
π Conclusionβ
The presented cases demonstrate the flexibility and ease of adoption of GuardianKey Auth Bastion Enterprise in different contexts. Whether focusing on MFA, federated login via GovBR, API automation, or granular policy control, the solution enables robust and scalable web application protection.
For support at any stage of integration, count on the GuardianKey Customer Success team.