-
-
Notifications
You must be signed in to change notification settings - Fork 234
feat: unified config #533
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
feat: unified config #533
Changes from 13 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
3555569
chore: add yaml config ref
steveiliop56 e4e99f4
feat: add initial implementation of a traefik like cli
steveiliop56 dba5580
refactor: remove dependency on traefik
steveiliop56 9c7a4af
chore: update example env
steveiliop56 3e12721
refactor: update build
steveiliop56 7857dba
chore: remove unused code
steveiliop56 0374370
fix: fix translations not loading
steveiliop56 c4529be
feat: add experimental config file support
steveiliop56 195b70b
chore: mod tidy
steveiliop56 7db8112
fix: review comments
steveiliop56 ed28e7a
refactor: move tinyauth to separate package
steveiliop56 5cfe2ba
chore: add quotes to all env variables
steveiliop56 db4ed94
chore: resolve go mod and sum conflicts
steveiliop56 d8b8be0
Merge branch 'main' of https://github.com/steveiliop56/tinyauth into …
steveiliop56 7c5fa11
chore: go mod tidy
steveiliop56 0a7e259
fix: review comments
steveiliop56 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,22 +1,86 @@ | ||
| PORT=3000 | ||
| ADDRESS=0.0.0.0 | ||
| APP_URL=http://localhost:3000 | ||
| USERS=your_user_password_hash | ||
| USERS_FILE=users_file | ||
| SECURE_COOKIE=false | ||
| OAUTH_WHITELIST= | ||
| GENERIC_NAME=My OAuth | ||
| SESSION_EXPIRY=7200 | ||
| LOGIN_TIMEOUT=300 | ||
| LOGIN_MAX_RETRIES=5 | ||
| LOG_LEVEL=debug | ||
| APP_TITLE=Tinyauth SSO | ||
| FORGOT_PASSWORD_MESSAGE=Some message about resetting the password | ||
| OAUTH_AUTO_REDIRECT=none | ||
| BACKGROUND_IMAGE=some_image_url | ||
| GENERIC_SKIP_SSL=false | ||
| RESOURCES_DIR=/data/resources | ||
| DATABASE_PATH=/data/tinyauth.db | ||
| DISABLE_ANALYTICS=false | ||
| DISABLE_RESOURCES=false | ||
| TRUSTED_PROXIES= | ||
| # Base Configuration | ||
|
|
||
| # The base URL where Tinyauth is accessible | ||
| TINYAUTH_APPURL="https://auth.example.com" | ||
| # Log level: trace, debug, info, warn, error | ||
| TINYAUTH_LOGLEVEL="info" | ||
| # Directory for static resources | ||
| TINYAUTH_RESOURCESDIR="/data/resources" | ||
| # Path to SQLite database file | ||
| TINYAUTH_DATABASEPATH="/data/tinyauth.db" | ||
| # Disable version heartbeat | ||
| TINYAUTH_DISABLEANALYTICS="false" | ||
| # Disable static resource serving | ||
| TINYAUTH_DISABLERESOURCES="false" | ||
| # Disable UI warning messages | ||
| TINYAUTH_DISABLEUIWARNINGS="false" | ||
| # Enable JSON formatted logs | ||
| TINYAUTH_LOGJSON="false" | ||
|
|
||
| # Server Configuration | ||
|
|
||
| # Port to listen on | ||
| TINYAUTH_SERVER_PORT="3000" | ||
| # Interface to bind to (0.0.0.0 for all interfaces) | ||
| TINYAUTH_SERVER_ADDRESS="0.0.0.0" | ||
| # Unix socket path (optional, overrides port/address if set) | ||
| TINYAUTH_SERVER_SOCKETPATH="" | ||
| # Comma-separated list of trusted proxy IPs/CIDRs | ||
| TINYAUTH_SERVER_TRUSTEDPROXIES="" | ||
|
|
||
| # Authentication Configuration | ||
|
|
||
| # Format: username:bcrypt_hash (use bcrypt to generate hash) | ||
| TINYAUTH_AUTH_USERS="admin:$2a$10$example_bcrypt_hash_here" | ||
| # Path to external users file (optional) | ||
| TINYAUTH_USERSFILE="" | ||
| # Enable secure cookies (requires HTTPS) | ||
| TINYAUTH_SECURECOOKIE="true" | ||
| # Session expiry in seconds (7200 = 2 hours) | ||
| TINYAUTH_SESSIONEXPIRY="7200" | ||
| # Login timeout in seconds (300 = 5 minutes) | ||
| TINYAUTH_LOGINTIMEOUT="300" | ||
| # Maximum login retries before lockout | ||
| TINYAUTH_LOGINMAXRETRIES="5" | ||
|
|
||
| # OAuth Configuration | ||
|
|
||
| # Regex pattern for allowed email addresses (e.g., /@example\.com$/) | ||
| TINYAUTH_OAUTH_WHITELIST="" | ||
| # Provider ID to auto-redirect to (skips login page) | ||
| TINYAUTH_OAUTH_AUTOREDIRECT="" | ||
| # OAuth Provider Configuration (replace MYPROVIDER with your provider name) | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_CLIENTID="your_client_id_here" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_CLIENTSECRET="your_client_secret_here" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_AUTHURL="https://provider.example.com/oauth/authorize" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_TOKENURL="https://provider.example.com/oauth/token" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_USERINFOURL="https://provider.example.com/oauth/userinfo" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_REDIRECTURL="https://auth.example.com/oauth/callback/myprovider" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_SCOPES="openid email profile" | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_NAME="My OAuth Provider" | ||
| # Allow self-signed certificates | ||
| TINYAUTH_OAUTH_PROVIDERS_MYPROVIDER_INSECURE="false" | ||
|
|
||
| # UI Customization | ||
|
|
||
| # Custom title for login page | ||
| TINYAUTH_UI_TITLE="Tinyauth" | ||
| # Message shown on forgot password page | ||
| TINYAUTH_UI_FORGOTPASSWORDMESSAGE="Contact your administrator to reset your password" | ||
| # Background image URL for login page | ||
| TINYAUTH_UI_BACKGROUNDIMAGE="" | ||
|
|
||
| # LDAP Configuration | ||
|
|
||
| # LDAP server address | ||
| TINYAUTH_LDAP_ADDRESS="ldap://ldap.example.com:389" | ||
| # DN for binding to LDAP server | ||
| TINYAUTH_LDAP_BINDDN="cn=readonly,dc=example,dc=com" | ||
| # Password for bind DN | ||
| TINYAUTH_LDAP_BINDPASSWORD="your_bind_password" | ||
| # Base DN for user searches | ||
| TINYAUTH_LDAP_BASEDN="dc=example,dc=com" | ||
| # Search filter (%s will be replaced with username) | ||
| TINYAUTH_LDAP_SEARCHFILTER="(&(uid=%s)(memberOf=cn=users,ou=groups,dc=example,dc=com))" | ||
| # Allow insecure LDAP connections | ||
| TINYAUTH_LDAP_INSECURE="false" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,29 +1,36 @@ | ||
| # dist | ||
| internal/assets/dist | ||
| /internal/assets/dist | ||
|
|
||
| # binaries | ||
| tinyauth | ||
| /tinyauth | ||
|
|
||
| # test docker compose | ||
| docker-compose.test* | ||
| /docker-compose.test* | ||
|
|
||
| # users file | ||
| users.txt | ||
| /users.txt | ||
|
|
||
| # secret test file | ||
| secret* | ||
| /secret* | ||
|
|
||
| # apple stuff | ||
| .DS_Store | ||
|
|
||
| # env | ||
| .env | ||
| /.env | ||
|
|
||
| # tmp directory | ||
| tmp | ||
| /tmp | ||
|
|
||
| # version files | ||
| internal/assets/version | ||
| /internal/assets/version | ||
|
|
||
| # data directory | ||
| data | ||
| /data | ||
|
|
||
| # config file | ||
| /config.yml | ||
|
|
||
| # binary out | ||
| /tinyauth.db | ||
| /resources |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.