Loading...
Loading...
Adds new users to Cloudflare Access authentication by updating ACCESS_ALLOWED_EMAIL in .env and syncing policies to all protected services. Use when you need to grant access to a new user, add someone to the network, share service access, or update allowed emails. Triggers on "add user to access", "grant access to [email]", "add [email] to cloudflare", "share access with", "allow [email] to authenticate", or "update access users". Works with .env, update-access-emails.sh, and Cloudflare Access policies for pihole, jaeger, langfuse, sprinkler, ha, and temet.ai services.
npx skill4agent add dawiddutoit/custom-claude cloudflare-access-add-userAdd user@example.com to Cloudflare Accessuser@example.comuser1@example.com, user2@example.comimport re
def validate_email(email):
pattern = r'^[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}$'
return bool(re.match(pattern, email.strip()))grep -E "^ACCESS_ALLOWED_EMAIL" /home/dawiddutoit/projects/network/.envACCESS_ALLOWED_EMAIL="email1,email2,email3"/home/dawiddutoit/projects/network/.envACCESS_ALLOWED_EMAIL="dawiddutoit@temet.ai,fifthchildd@gmail.com"ACCESS_ALLOWED_EMAIL="dawiddutoit@temet.ai,fifthchildd@gmail.com,dawidddutoit@gmail.com"/home/dawiddutoit/projects/network/scripts/update-access-emails.shinclude"include": [
{"email": {"email": "dawiddutoit@temet.ai"}},
{"email": {"email": "fifthchildd@gmail.com"}},
{"email": {"email": "dawidddutoit@gmail.com"}},
{"email": {"email": "NEW_EMAIL_HERE"}}
]cd /home/dawiddutoit/projects/network && ./scripts/update-access-emails.shUpdating policies for all services to include all three emails...
Processing app: 56de3246-c9ed-4877-8af1-dc360ac49584
Updating policy: <policy-id>
[checkmark] Policy updated successfully
Processing app: 9f1e8109-3f3f-456e-94f5-093bfc9e1c1e
...
[checkmark] Policy updated successfully
All policies updated!ACCESS GRANTED FOR: [email]
To test your access:
1. Open an incognito/private browser window
2. Navigate to: https://pihole.temet.ai
3. Click "Google" to authenticate
4. Sign in with your Google account: [email]
5. After successful authentication, you should see Pi-hole admin
All accessible services:
- https://pihole.temet.ai (Pi-hole DNS admin)
- https://jaeger.temet.ai (Jaeger tracing)
- https://langfuse.temet.ai (Langfuse monitoring)
- https://sprinkler.temet.ai (Sprinkler system)
- https://ha.temet.ai (Home Assistant)
- https://temet.ai (Services dashboard)| File | Purpose |
|---|---|
| Technical details, API structure, troubleshooting |
| Common scenarios and edge cases |
.env