ASHIK
07/14/2025, 1:54 PMMarvin
07/14/2025, 1:54 PMMarvin
07/14/2025, 1:55 PMbash
# Set the authentication string in your environment
export PREFECT_SERVER_API_AUTH_STRING="admin:yourpassword"
Or add it to your `~/.prefect/config.toml`:
toml
[server.api]
auth_string = "admin:yourpassword"
2. Client Configuration
Any client that needs to communicate with your Prefect server (including flow runners) needs the same authentication configuration. You can:
- Set the same environment variable
- Use the same config.toml setting
- Or use a .env file:
bash
PREFECT_SERVER_API_AUTH_STRING="admin:yourpassword"
3. UI Access
When you access the Prefect UI, you'll be prompted to enter these credentials:
- Username: admin
- Password: yourpassword
Security Best Practices:
- Use a strong password
- Store credentials securely (not in version control)
- Consider using environment variables or secure secret management
- Change credentials periodically
You can find more detailed information about security settings in the Prefect documentation.
Remember that this is basic authentication and might need to be combined with other security measures (like HTTPS) depending on your specific security requirements.
Would you like me to provide more specific details about any part of the authentication setup?