Basic Configuration
This guide covers the fundamental concepts and setup procedures for Enveilβs environment identification system, including both traditional site configurations and cloud environment highlighting.
Configuration Hierarchy
Enveil uses a flexible two-tab interface to organize your environment rules:
Dual-Tab Structure
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β [ Site Configurations ] [ Cloud Environments ] β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β β
β Site Configurations: β
β βββ Group 1: "Development Environments" β
β β βββ Site Rule: localhost β DEV (Blue) β
β β βββ Site Rule: *.dev β DEV (Blue) β
β β βββ Site Rule: dev.company.com β DEV (Blue) β
β βββ Group 2: "Production Environments" β
β β βββ Site Rule: company.com β PROD (Red + Background) β
β β βββ Site Rule: app.company.com β PROD (Red + Background)β
β βββ Group 3: "Testing Environments" β
β βββ Site Rule: test.company.com β TEST (Yellow) β
β βββ Site Rule: uat.company.com β UAT (Orange) β
β β
β Cloud Environments: β
β βββ Environment 1: "Production AWS" (AWS China) β
β β βββ Account: prod-main (123456789012) - Red background β
β β β βββ Roles: Admin, ReadOnly β
β β βββ Account: prod-security (123456789013) - Orange β
β β βββ Roles: SecurityAdmin, Auditor β
β βββ Environment 2: "Development AWS" (AWS China) β
β βββ Account: dev-sandbox (987654321098) - Blue β
β β βββ Roles: Developer, Tester β
β βββ Account: dev-shared (987654321099) - Green β
β βββ Roles: DevOps, ReadOnly β
β β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Site Configuration
Configuration Groups
Configuration groups help you organize related site rules together.
Creating Groups
- Click βAdd Groupβ in the Site Configurations tab
- Configure Group Settings:
- Name: Descriptive identifier (e.g., βProduction Sitesβ)
- Enable: Toggle to activate/deactivate entire group
- Default Settings: Applied to new sites in this group
Site configuration groups with multiple environment rules
Group Default Settings
Group defaults streamline adding multiple similar sites:
{
envName: "PROD", // Default environment name
backgroundEnable: true, // Enable background overlay
flagEnable: true, // Enable corner banner
color: "#f44336" // Default red for production
}
Benefits:
- Consistency: All sites in group share common settings
- Efficiency: Faster configuration for multiple similar sites
- Maintenance: Change defaults to update multiple sites
Group Management
| Action | Description | Use Case |
|---|---|---|
| Enable/Disable | Toggle entire group | Temporarily disable project environments |
| Edit | Modify group name and defaults | Update team standards |
| Delete | Remove group and all sites | Clean up obsolete projects |
| Export | Save group as JSON file | Share project configurations |
Site Rules
Basic Site Configuration
Each site rule defines how to identify and display an environment:
| Field | Description | Example |
|---|---|---|
| Enable | Toggle this specific rule | β |
| Match Pattern | How to match URLs | domain |
| Match Value | What to match against | localhost |
| Environment Name | Display text | DEV |
| Color | Visual theme color | #4a9eff |
| Position | Banner corner | rightTop |
| Banner Enable | Show corner ribbon | β |
| Background Enable | Show page overlay | β |
Site group item showing multiple environment rules
Match Patterns Explained
1. Domain Matching (domain)
Best for: Entire websites and their subdomains
Pattern: domain
Value: example.com
Matches:
β example.com
β www.example.com
β app.example.com
β api.example.com
β example.org
β notexample.com
Use Cases:
- Company websites:
company.com - Development domains:
localhost - Staging environments:
staging.company.com
2. URL Prefix Matching (urlPrefix)
Best for: Specific paths or API endpoints
Pattern: urlPrefix
Value: https://api.example.com/v1
Matches:
β https://api.example.com/v1
β https://api.example.com/v1/users
β https://api.example.com/v1/data/reports
β https://api.example.com/v2
β http://api.example.com/v1 (different protocol)
Use Cases:
- API versions:
https://api.company.com/v1 - Admin sections:
https://app.company.com/admin - Specific applications:
https://company.com/dashboard
3. Exact URL Matching (url)
Best for: Single specific pages
Pattern: url
Value: http://localhost:8080/admin
Matches:
β http://localhost:8080/admin
β http://localhost:8080/admin/users
β https://localhost:8080/admin
β http://localhost:3000/admin
Use Cases:
- Login pages:
https://company.com/login - Specific admin panels:
http://localhost:8080/admin - Landing pages:
https://company.com/welcome
4. Regular Expression (regex)
Best for: Complex pattern matching
Pattern: regex
Value: ^https?:\/\/.*\.test\.com
Matches:
β https://app.test.com
β http://api.test.com
β https://staging.test.com
β https://test.com (no subdomain)
β https://app.test.org (different TLD)
Common Regex Patterns:
- Any subdomain:
^https?:\/\/.*\.example\.com - Localhost with any port:
^http:\/\/localhost:\d+ - Multiple domains:
^https?:\/\/(app|api|admin)\.example\.com
5. Everything (Auto-Detection) (everything)
Best for: Intelligent pattern recognition
The system automatically detects the best matching approach:
Value: * β Matches all URLs
Value: localhost β Domain matching
Value: https://api.com β URL prefix matching
Value: /^https?:\/\/.*\.dev$/ β Regex matching
Cloud Environment Configuration
Overview
Cloud Environment configuration allows you to visually distinguish between different cloud provider accounts and roles on account selection pages and console interfaces.
Cloud environments portal showing configured providers
Creating a Cloud Environment
- Switch to βCloud Environmentsβ tab
- Click βAdd Providerβ
- Select Provider Template:
- AWS China: For
*.amazonaws.cndomains - AWS Global: For
*.aws.amazon.comdomains - Custom: For other cloud providers
- AWS China: For
- Enter Environment Name: e.g., βProduction AWSβ
- Click Save
Cloud environment configuration with provider selection
Cloud Account Configuration
Each cloud account defines visual highlighting for specific accounts:
| Field | Description | Example |
|---|---|---|
| Name | Account identifier | prod-main |
| Enable | Toggle account highlighting | β |
| Background Enable | Show background overlay | β |
| Background Color | Account highlight color | #f44336 |
| Account Patterns | URL patterns to match account | domain: 123456789012 |
| Roles | Role keyword highlighting rules | Admin, ReadOnly |
Account Patterns
Account patterns use the same matching strategies as site configurations:
Match by Account ID (AWS):
Pattern: domain
Value: 123456789012
Match by Account Name:
Pattern: contains
Value: production-main
Match Multiple Accounts:
Pattern: regex
Value: (123456789012|987654321098)
Role Highlighting
Roles define keywords to highlight within cloud pages:
| Field | Description | Example |
|---|---|---|
| Enable | Toggle role highlighting | β |
| Match Pattern | Matching strategy | contains or regex |
| Match Value | Keyword to highlight | Administrator |
Role Configuration Examples:
# Highlight Administrator roles
Match Pattern: contains
Match Value: Administrator
# Highlight multiple role patterns
Match Pattern: regex
Match Value: (Admin|PowerUser|FullAccess)
# Highlight specific role names
Match Pattern: contains
Match Value: ReadOnlyAccess
Visual Effects
Account Background Highlighting
- Opacity: 25% (0.25) with border
- Border: 2px solid with glow effect
- Coverage: Account containers on selection pages
- Transition: Smooth 0.3s ease animation
Role Text Highlighting
- Background: Yellow (
#ffeb3b) - Text Color: Black (
#000000) - Font Weight: Bold
- Padding: 1px 3px
- Border Radius: 2px
AWS account selection page with account highlighting and role keyword emphasis
Visual Indicators
Corner Banners
Corner banners are rotated ribbons that appear in page corners:
Positions
leftTop: Top-left corner (45Β° rotation)rightTop: Top-right corner (-45Β° rotation)leftBottom: Bottom-left corner (-45Β° rotation)rightBottom: Bottom-right corner (45Β° rotation)
Styling
- Size: 150x150px container with 220px ribbon
- Typography: Bold, uppercase, 13px font
- Shadow: Drop shadow for visibility
- Colors: Configurable background with white text
Example of environment banner displayed on a webpage
Background Overlays
Background overlays provide subtle full-page color tinting:
- Opacity: 5% (0.05) for sites, 25% (0.25) for cloud accounts
- Coverage: Full viewport (100vw Γ 100vh)
- Z-index: Below banners but above page content
- Use Case: Production environment warnings
Color Management
Default Color Palette
Enveil includes 10 predefined colors optimized for different environments:
| Color | Hex Code | Typical Use |
|---|---|---|
| Blue | #4a9eff |
Development |
| Green | #4CAF50 |
Staging |
| Orange | #ff9800 |
Testing |
| Red | #f44336 |
Production |
| Purple | #9c27b0 |
Special environments |
| Cyan | #00bcd4 |
Integration |
| Yellow | #ffeb3b |
Warning environments |
| Brown | #795548 |
Legacy systems |
| Blue Grey | #607d8b |
Neutral environments |
| Pink | #e91e63 |
Experimental |
Custom Colors
- Click any color circle in the left sidebar
- Use color picker to select custom color
- Enter hex codes directly
- Add new colors with the
+button
Color Best Practices
- Consistent Meaning: Use same colors for similar environments across projects
- High Contrast: Ensure banners are visible on all backgrounds
- Team Standards: Establish color conventions with your team
- Accessibility: Consider color-blind users when choosing colors
- Cloud Safety: Use red/orange for production cloud accounts as warning
Configuration Examples
Simple Development Setup
{
"name": "Local Development",
"sites": [
{
"matchPattern": "domain",
"matchValue": "localhost",
"envName": "DEV",
"color": "#4a9eff",
"Position": "rightTop",
"flagEnable": true,
"backgroudEnable": false
}
]
}
Multi-Environment Project
{
"name": "Company Project",
"sites": [
{
"matchPattern": "domain",
"matchValue": "dev.company.com",
"envName": "DEV",
"color": "#4a9eff"
},
{
"matchPattern": "domain",
"matchValue": "staging.company.com",
"envName": "STAGING",
"color": "#ff9800"
},
{
"matchPattern": "domain",
"matchValue": "company.com",
"envName": "PROD",
"color": "#f44336",
"backgroudEnable": true
}
]
}
AWS Cloud Environment Setup
{
"name": "Production AWS",
"provider": "aws-cn",
"accounts": [
{
"name": "prod-main",
"backgroundColor": "#f44336",
"backgroundEnable": true,
"accountPatterns": [
{
"matchPattern": "domain",
"matchValue": "123456789012"
}
],
"roles": [
{
"matchPattern": "contains",
"matchValue": "Administrator"
},
{
"matchPattern": "contains",
"matchValue": "FullAccess"
}
]
}
]
}
Testing Your Configuration
Verification Steps
- Save Configuration: Ensure all changes are saved
- Open Test URLs: Visit configured domains in new tabs
- Check Visual Indicators: Verify banners and overlays appear
- Test Cloud Pages: For cloud environments, test both account selection and console pages
- Verify Role Highlighting: Check that role keywords are highlighted in yellow
- Test Edge Cases: Try subdomains, different paths
- Verify Exclusions: Confirm non-matching URLs show no indicators
Common Issues
| Problem | Cause | Solution |
|---|---|---|
| No banner appears | Pattern doesnβt match URL | Check match pattern and value |
| Wrong color shows | Multiple rules match | Check rule order and specificity |
| Banner in wrong position | Incorrect position setting | Verify position configuration |
| Cloud highlighting not working | Wrong provider template | Verify AWS region selection |
| Role keywords not highlighted | Role not enabled | Check role enable status |
| Background too strong | High opacity | Background uses fixed opacity levels |
Next Steps
Once youβve mastered basic configuration:
- Explore Advanced Configuration for detailed settings
- Learn about Cloud Environment advanced features
- Set up Browser Synchronization
- Review Features Overview for all capabilities
Ready for more? Continue to Configuration Guide to unlock Enveilβs full potential.