Authentication Methods
Shannon supports four authentication types:Form Login
Standard HTML login forms with username/password
SSO / OAuth
Single sign-on with Google, GitHub, etc.
API Authentication
Token-based authentication via API endpoints
Basic Auth
HTTP Basic Authentication
Form Login
The most common authentication type for web applications.Login Flow Instructions
Provide natural language steps for the AI to follow. Use these variables:$username- Replaced withcredentials.username$password- Replaced withcredentials.password$totp- Replaced with current TOTP code (iftotp_secretprovided)
- Be specific about field names (e.g., “email field” not “first field”)
- Include wait steps if pages load between actions
- Describe buttons by their visible text (e.g., “Click ‘Sign In’ button”)
- Keep steps concise (max 500 characters per step)
- Use 1-20 steps total
Success Conditions
Define how Shannon knows authentication succeeded:- URL Contains
- URL Equals
- Element Present
- Text Contains
Check if URL contains a substring (most common):
SSO / OAuth Login
For applications using single sign-on providers like Google, GitHub, or custom OAuth.SSO with 2FAIf your SSO provider uses 2FA, add
totp_secret to credentials and include the TOTP step in your login flow:API Authentication
For applications using token-based authentication via API endpoints.Basic Authentication
For applications using HTTP Basic Auth.TOTP 2FA Setup
Shannon automatically generates time-based one-time passwords (TOTP) for two-factor authentication when you provide atotp_secret.
Getting Your TOTP Secret
The TOTP secret is the Base32-encoded shared secret used to generate 6-digit codes. Here’s how to find it:Enable 2FA on Test Account
Set up two-factor authentication on your test account as you normally would.
Reveal the Secret Key
Most apps show a QR code and a “manual entry” or “secret key” option. Click to reveal the secret.Example secret:
JBSWY3DPEHPK3PXPTOTP Format
Base32-encoded TOTP secret (case insensitive)Valid characters: A-Z, 2-7, and
= for paddingExample: JBSWY3DPEHPK3PXPCommon TOTP issues
Common TOTP issues
Invalid secret formatEnsure your secret only contains Base32 characters (A-Z, 2-7, =).Wrong code generated
- Check that the secret is copied correctly (no spaces)
- Verify system time is synchronized (TOTP is time-based)
- Some apps use 8-digit codes instead of 6-digit (not currently supported)
Credentials Management
Environment Variable Substitution
Avoid hardcoding credentials by using environment variables:.env file:
Provider Credentials
For AI provider authentication (Anthropic, AWS Bedrock, Google Vertex AI), configure in.env:
- Anthropic API
- Claude Code OAuth
- AWS Bedrock
- Google Vertex AI
.env
Testing Authentication
Verify your authentication configuration before running a full pentest:Troubleshooting
Authentication timeout
Authentication timeout
Cause: Login flow steps took too long or page didn’t load.Solutions:
- Add explicit wait steps between actions
- Increase timeouts in login flow instructions
- Simplify login flow (remove unnecessary steps)
- Check that URLs are correct
Element not found
Element not found
Cause: Field or button selectors in login flow don’t match actual page elements.Solutions:
- Use exact button text from the page
- Be specific about field labels (“email field” not “first field”)
- Verify login URL loads the correct page
- Check for dynamic content that loads after page render
Success condition never met
Success condition never met
Cause: Success condition doesn’t match post-login state.Solutions:
- Verify URL/element/text after manual login
- Try different condition types (url_contains vs element_present)
- Check for redirects that change the final URL
- Ensure success condition is unique to logged-in state
TOTP codes rejected
TOTP codes rejected
Cause: TOTP secret is incorrect or time synchronization issue.Solutions:
- Verify secret is copied correctly (no spaces/newlines)
- Check system time is accurate (TOTP requires sync)
- Regenerate TOTP secret from app settings
- Test secret with an authenticator app first
Related Resources
Configuration
Complete YAML configuration reference
Cloud Providers
AWS Bedrock and Google Vertex AI setup