Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
112 commits
Select commit Hold shift + click to select a range
f0384e7
Deploy authorizer with custom db
lakhansamani Jan 30, 2022
441b0b7
Bump 0.10.0
lakhansamani Jan 31, 2022
0b84e2a
Bump to 0.10.0
lakhansamani Jan 31, 2022
097c406
Merge branch 'without-postgres' of github.com:authorizerdev/authorize…
lakhansamani Feb 2, 2022
5c08a42
chore: bump 0.10.1
lakhansamani Feb 2, 2022
ebd2c2f
chore: bump 0.10.2
lakhansamani Feb 2, 2022
cfdb98e
chore: bump 0.10.3
lakhansamani Feb 5, 2022
1dae2a0
chore: bump 0.12.0
lakhansamani Feb 17, 2022
7e496ab
chore: bump 0.13.0
lakhansamani Feb 18, 2022
2251cdb
chore: bump 0.13.1
lakhansamani Feb 18, 2022
c26d785
chore: bump 0.14.0
lakhansamani Mar 9, 2022
0b34ab2
chore: bump 0.15.0
lakhansamani Mar 16, 2022
9c54ef3
chore: bump 0.16.0
lakhansamani Mar 24, 2022
e75a6a1
chore: bump 0.17.0
lakhansamani Mar 25, 2022
f85046f
chore: bump 0.18.0
lakhansamani Mar 30, 2022
52c671b
chore: bump 0.18.1
lakhansamani Apr 2, 2022
5e50c2b
chore: bump 0.19.0
lakhansamani Apr 10, 2022
424b099
chore: bump 0.20.0
lakhansamani Apr 23, 2022
5dbd2ca
chore: bump 0.21.0
lakhansamani Apr 23, 2022
067e89c
chore: bump 0.22.0
lakhansamani Apr 30, 2022
86e14a5
chore: bump 0.22.1
lakhansamani May 13, 2022
a5db5e7
chore: bump 0.22.2
lakhansamani May 15, 2022
df0240f
chore: bump 0.23.0
lakhansamani May 25, 2022
5bc56a6
chore: bump 0.24.0
lakhansamani Jun 3, 2022
52d5e56
chore: bump 0.25.0
lakhansamani Jun 5, 2022
d2343ff
chore: bump 0.26.0
lakhansamani Jun 6, 2022
dd5839b
chore: bump 0.27.0
lakhansamani Jun 7, 2022
2c5a97b
chore: bump 0.28.0
lakhansamani Jun 7, 2022
6fc3e73
bump: 0.29.0
lakhansamani Jun 9, 2022
d06c7c1
bump: 0.30.0
lakhansamani Jun 10, 2022
1545126
bump: 0.31.0
lakhansamani Jun 12, 2022
d1e5978
bump: 0.32.0
lakhansamani Jun 16, 2022
a09dfb2
bump: 0.33.0
lakhansamani Jun 18, 2022
65fcbb1
bump: 0.34.0
lakhansamani Jul 1, 2022
f2a3d5d
bump: 0.35.0
lakhansamani Jul 4, 2022
49a0a12
bump: 0.36.0
lakhansamani Jul 12, 2022
a3059e5
bump: 0.37.0
lakhansamani Jul 13, 2022
5d15741
bump: 0.38.0
lakhansamani Jul 17, 2022
f372cb3
bump: 1.0.0
lakhansamani Aug 15, 2022
0703300
bump: 1.0.1
lakhansamani Aug 18, 2022
d7ad7b9
bump: 1.1.0
lakhansamani Aug 29, 2022
ff2d5fb
bump: 1.1.2
lakhansamani Sep 10, 2022
5a0415e
bump: 1.1.3
lakhansamani Sep 14, 2022
2ae8ec7
bump: 1.1.4
lakhansamani Sep 14, 2022
bd46954
bump: 1.1.5
lakhansamani Sep 15, 2022
39f682c
bump: 1.1.6
lakhansamani Sep 27, 2022
96fa2ba
bump: 1.1.7
lakhansamani Sep 28, 2022
b1b2bc2
bump: 1.1.8
lakhansamani Sep 28, 2022
e9fbac4
bump: 1.1.9
lakhansamani Sep 28, 2022
5551a95
bump: 1.1.20
lakhansamani Oct 2, 2022
90ba6af
bump: 1.1.21
lakhansamani Oct 21, 2022
d60b5e4
bump: 1.1.22
lakhansamani Oct 25, 2022
ae8287b
bump: 1.1.23
lakhansamani Nov 1, 2022
cdf8d5d
bump: 1.1.24
lakhansamani Nov 3, 2022
589388b
bump: 1.1.25
lakhansamani Nov 4, 2022
a5bdc53
bump: 1.1.26
lakhansamani Nov 7, 2022
c6b3985
bump: 1.1.27
lakhansamani Nov 9, 2022
dea851d
bump: 1.1.28-rc.1
lakhansamani Nov 16, 2022
6414eff
bump: 1.1.28-rc.4
lakhansamani Nov 22, 2022
7ed1fc9
bump: 1.1.29
lakhansamani Nov 24, 2022
6a9be3b
bump: 1.1.30
lakhansamani Nov 29, 2022
3f3ce09
bump: 1.1.31
lakhansamani Dec 24, 2022
890555e
bump: 1.1.32
lakhansamani Jan 5, 2023
cb31bba
bump: 1.1.33
lakhansamani Jan 20, 2023
ed27a70
bump: 1.1.35
lakhansamani Feb 3, 2023
fd7ced1
bump: 1.1.36
lakhansamani Feb 5, 2023
660077e
bump: 1.1.37
lakhansamani Feb 8, 2023
9f017dd
bump: 1.1.38
lakhansamani Feb 10, 2023
9168d35
bump: 1.1.39
lakhansamani Feb 26, 2023
b75c614
bump: 1.1.40
lakhansamani Feb 28, 2023
54ade23
bump: 1.1.41
lakhansamani Mar 7, 2023
6e95565
bump: 1.1.42
lakhansamani Mar 29, 2023
c1c7a12
bump: 1.1.43
lakhansamani Apr 1, 2023
d8bbabc
bump: 1.1.44
lakhansamani Apr 8, 2023
1de127a
bump: 1.1.47
lakhansamani May 12, 2023
512a053
bump: 1.1.48
lakhansamani May 16, 2023
fc601ec
bump: 1.1.49
lakhansamani May 20, 2023
1b06b5e
bump: 1.1.50
lakhansamani May 29, 2023
a1cec24
bump: 1.1.52
lakhansamani Jun 30, 2023
f3ea0c8
bump: 1.1.53
lakhansamani Jul 12, 2023
1507027
bump: 1.1.54
lakhansamani Jul 16, 2023
ecc63d5
bump: 1.1.57
lakhansamani Jul 25, 2023
82c3625
bump: 1.1.58
lakhansamani Jul 25, 2023
c12ff5b
bump: 1.1.59
lakhansamani Aug 2, 2023
cec224e
bump: 1.1.60
lakhansamani Aug 3, 2023
1d0b6f1
bump: 1.1.61
lakhansamani Aug 3, 2023
edae4dc
bump: 1.1.62
lakhansamani Aug 3, 2023
98a9f91
bump: 1.1.63
lakhansamani Aug 14, 2023
0f075ff
bump: 1.1.64
lakhansamani Aug 17, 2023
2736c52
bump: 1.1.68
lakhansamani Oct 12, 2023
43d6575
bump: 1.1.69
lakhansamani Oct 13, 2023
a6e8c76
bump: 1.1.70
lakhansamani Oct 14, 2023
a26407c
bump: 1.1.71
lakhansamani Oct 21, 2023
8020404
bump: 1.2.0
lakhansamani Oct 26, 2023
331ab06
bump: 1.2.1
lakhansamani Nov 3, 2023
4669b03
bump: 1.2.2
lakhansamani Nov 9, 2023
98ef3ff
bump: 1.2.3
lakhansamani Nov 24, 2023
0aba332
bump: 1.2.4
lakhansamani Nov 25, 2023
0dc7a91
bump: 1.3.0
lakhansamani Dec 3, 2023
d982951
bump: 1.3.1
lakhansamani Dec 4, 2023
34ebfbf
bump: 1.3.2
lakhansamani Dec 4, 2023
30a84cc
Merge branch 'main' of github.com:authorizerdev/authorizer-render int…
lakhansamani Dec 26, 2023
8e1bb72
Merge branch 'main' of github.com:authorizerdev/authorizer-render int…
lakhansamani Dec 26, 2023
cca3e96
Merge branch 'main' of github.com:authorizerdev/authorizer-render int…
lakhansamani Dec 31, 2023
6603ab1
Merge branch 'main' of github.com:authorizerdev/authorizer-render int…
lakhansamani Jan 8, 2024
ede9778
bump: 1.4.0
lakhansamani Apr 2, 2024
95765ee
bump: 1.4.1
lakhansamani May 1, 2024
05f8a6c
bump: 1.4.2
lakhansamani May 1, 2024
91e54da
bump: 1.4.3
lakhansamani May 10, 2024
599609c
bump: 1.4.4
lakhansamani Sep 1, 2024
d2be6b1
chore: bump 2.0.0
lakhansamani Mar 21, 2026
174f4d3
fix(security): harden Dockerfiles - remove CLI secrets, fix defaults,…
lakhansamani Apr 4, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
112 changes: 109 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,109 @@
FROM lakhansamani/authorizer:1.3.8

CMD ./build/server
# Base runs as USER authorizer (uid 1000). For SQLite, ensure mounted /data is writable by that user.
FROM lakhansamani/authorizer:2.0.0
# Override so CMD runs in a shell and env vars (e.g. for Render) are expanded. See base image comment.
# Use exec-form CMD with a single string so /bin/sh -c gets one argument; shell-form CMD can be split and drop into a shell.
ENTRYPOINT ["/bin/sh", "-c"]
# Single CMD string so the whole command is run by sh -c (not just "./authorizer").
# Backslash-newline inside the string lets sh treat this as one command across lines.
CMD ["exec ./authorizer \\\n\
--database-type=\"${DATABASE_TYPE:-postgres}\" \\\n\
--database-url=\"${DATABASE_URL}\" \\\n\
--client-id=\"${CLIENT_ID}\" \\\n\
--client-secret=\"${CLIENT_SECRET}\" \\\n\
--admin-secret=\"${ADMIN_SECRET}\" \\\n\
--redis-url=\"${REDIS_URL}\" \\\n\
--jwt-type=\"${JWT_TYPE}\" \\\n\
--jwt-secret=\"${JWT_SECRET}\" \\\n\
--jwt-private-key=\"${JWT_PRIVATE_KEY}\" \\\n\
--jwt-public-key=\"${JWT_PUBLIC_KEY}\" \\\n\
--jwt-role-claim=\"${JWT_ROLE_CLAIM}\" \\\n\
--custom-access-token-script=\"${CUSTOM_ACCESS_TOKEN_SCRIPT}\" \\\n\
--roles=\"${ROLES}\" \\\n\
--default-roles=\"${DEFAULT_ROLES}\" \\\n\
--protected-roles=\"${PROTECTED_ROLES}\" \\\n\
--allowed-origins=\"${ALLOWED_ORIGINS}\" \\\n\
--default-authorize-response-type=\"${DEFAULT_AUTHORIZE_RESPONSE_TYPE}\" \\\n\
--default-authorize-response-mode=\"${DEFAULT_AUTHORIZE_RESPONSE_MODE}\" \\\n\
--organization-name=\"${ORGANIZATION_NAME}\" \\\n\
--organization-logo=\"${ORGANIZATION_LOGO}\" \\\n\
--smtp-host=\"${SMTP_HOST}\" \\\n\
--smtp-port=\"${SMTP_PORT:-0}\" \\\n\
--smtp-username=\"${SMTP_USERNAME}\" \\\n\
--smtp-password=\"${SMTP_PASSWORD}\" \\\n\
--smtp-sender-email=\"${SENDER_EMAIL}\" \\\n\
--smtp-sender-name=\"${SENDER_NAME}\" \\\n\
--reset-password-url=\"${RESET_PASSWORD_URL}\" \\\n\
--env=\"${ENV}\" \\\n\
--host=\"${HOST:-0.0.0.0}\" \\\n\
--metrics-port=\"${METRICS_PORT:-8081}\" \\\n\
--enable-login-page=\"${ENABLE_LOGIN_PAGE:-true}\" \\\n\
--enable-playground=\"${ENABLE_PLAYGROUND:-true}\" \\\n\
--disable-admin-header-auth=\"${DISABLE_ADMIN_HEADER_AUTH:-true}\" \\\n\
--enable-graphql-introspection=\"${ENABLE_GRAPHQL_INTROSPECTION:-true}\" \\\n\
--app-cookie-secure=\"${APP_COOKIE_SECURE:-true}\" \\\n\
--admin-cookie-secure=\"${ADMIN_COOKIE_SECURE:-true}\" \\\n\
--database-name=\"${DATABASE_NAME}\" \\\n\
--database-username=\"${DATABASE_USERNAME}\" \\\n\
--database-password=\"${DATABASE_PASSWORD}\" \\\n\
--database-host=\"${DATABASE_HOST}\" \\\n\
--database-port=\"${DATABASE_PORT:-0}\" \\\n\
--database-cert=\"${DATABASE_CERT}\" \\\n\
--database-ca-cert=\"${DATABASE_CA_CERT}\" \\\n\
--database-cert-key=\"${DATABASE_CERT_KEY}\" \\\n\
--couchbase-bucket=\"${COUCHBASE_BUCKET}\" \\\n\
--couchbase-scope=\"${COUCHBASE_SCOPE}\" \\\n\
--couchbase-ram-quota=\"${COUCHBASE_RAM_QUOTA}\" \\\n\
--aws-region=\"${AWS_REGION}\" \\\n\
--aws-access-key-id=\"${AWS_ACCESS_KEY_ID}\" \\\n\
--aws-secret-access-key=\"${AWS_SECRET_ACCESS_KEY}\" \\\n\
--smtp-local-name=\"${SMTP_LOCAL_NAME}\" \\\n\
--smtp-skip-tls-verification=\"${SMTP_SKIP_TLS_VERIFICATION:-false}\" \\\n\
--enable-strong-password=\"${ENABLE_STRONG_PASSWORD:-true}\" \\\n\
--enable-totp-login=\"${ENABLE_TOTP_LOGIN:-false}\" \\\n\
--enable-basic-authentication=\"${ENABLE_BASIC_AUTHENTICATION:-true}\" \\\n\
--enable-email-verification=\"${ENABLE_EMAIL_VERIFICATION:-false}\" \\\n\
--enable-mobile-basic-authentication=\"${ENABLE_MOBILE_BASIC_AUTHENTICATION:-true}\" \\\n\
--enable-phone-verification=\"${ENABLE_PHONE_VERIFICATION:-false}\" \\\n\
--enable-magic-link-login=\"${ENABLE_MAGIC_LINK_LOGIN:-false}\" \\\n\
--enforce-mfa=\"${ENFORCE_MFA:-true}\" \\\n\
--enable-mfa=\"${ENABLE_MFA:-false}\" \\\n\
--enable-email-otp=\"${ENABLE_EMAIL_OTP:-false}\" \\\n\
--enable-sms-otp=\"${ENABLE_SMS_OTP:-false}\" \\\n\
--enable-signup=\"${ENABLE_SIGNUP:-true}\" \\\n\
--twilio-account-sid=\"${TWILIO_ACCOUNT_SID}\" \\\n\
--twilio-api-key=\"${TWILIO_API_KEY}\" \\\n\
--twilio-api-secret=\"${TWILIO_API_SECRET}\" \\\n\
--twilio-sender=\"${TWILIO_SENDER}\" \\\n\
--google-client-id=\"${GOOGLE_CLIENT_ID}\" \\\n\
--google-client-secret=\"${GOOGLE_CLIENT_SECRET}\" \\\n\
--google-scopes=\"${GOOGLE_SCOPES}\" \\\n\
--github-client-id=\"${GITHUB_CLIENT_ID}\" \\\n\
--github-client-secret=\"${GITHUB_CLIENT_SECRET}\" \\\n\
--github-scopes=\"${GITHUB_SCOPES}\" \\\n\
--facebook-client-id=\"${FACEBOOK_CLIENT_ID}\" \\\n\
--facebook-client-secret=\"${FACEBOOK_CLIENT_SECRET}\" \\\n\
--facebook-scopes=\"${FACEBOOK_SCOPES}\" \\\n\
--microsoft-client-id=\"${MICROSOFT_CLIENT_ID}\" \\\n\
--microsoft-client-secret=\"${MICROSOFT_CLIENT_SECRET}\" \\\n\
--microsoft-tenant-id=\"${MICROSOFT_TENANT_ID}\" \\\n\
--microsoft-scopes=\"${MICROSOFT_SCOPES}\" \\\n\
--apple-client-id=\"${APPLE_CLIENT_ID}\" \\\n\
--apple-client-secret=\"${APPLE_CLIENT_SECRET}\" \\\n\
--apple-scopes=\"${APPLE_SCOPES}\" \\\n\
--discord-client-id=\"${DISCORD_CLIENT_ID}\" \\\n\
--discord-client-secret=\"${DISCORD_CLIENT_SECRET}\" \\\n\
--discord-scopes=\"${DISCORD_SCOPES}\" \\\n\
--linkedin-client-id=\"${LINKEDIN_CLIENT_ID}\" \\\n\
--linkedin-client-secret=\"${LINKEDIN_CLIENT_SECRET}\" \\\n\
--linkedin-scopes=\"${LINKEDIN_SCOPES}\" \\\n\
--twitch-client-id=\"${TWITCH_CLIENT_ID}\" \\\n\
--twitch-client-secret=\"${TWITCH_CLIENT_SECRET}\" \\\n\
--twitch-scopes=\"${TWITCH_SCOPES}\" \\\n\
--twitter-client-id=\"${TWITTER_CLIENT_ID}\" \\\n\
--twitter-client-secret=\"${TWITTER_CLIENT_SECRET}\" \\\n\
--twitter-scopes=\"${TWITTER_SCOPES}\" \\\n\
--roblox-client-id=\"${ROBLOX_CLIENT_ID}\" \\\n\
--roblox-client-secret=\"${ROBLOX_CLIENT_SECRET}\" \\\n\
--roblox-scopes=\"${ROBLOX_SCOPES}\" \\\n\
--log-level=\"${LOG_LEVEL:-info}\" \\\n\
--http-port=\"${PORT:-8080}\""]
31 changes: 23 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Authorizer on Render

Click to deploy a [Authorizer](https://authorizer.dev) instance with a managed PostgreSQL database on [Render](https://render.com/).
Deploy production ready [authorizer.dev](https://authorizer.dev) instance on [Render](https://render.com/) with a managed PostgreSQL database and build with it in 30seconds

[![Deploy to Render](https://render.com/images/deploy-to-render-button.svg)](https://render.com/deploy?repo=https://github.com/authorizerdev/authorizer-render)

Expand All @@ -10,16 +10,31 @@ After clicking the above button, follow the steps mentioned below:

Enter the name for your instance.

> Note: Optionally you can choose to deploy a branch `without-postgres` and configure database env, if you already have an postgres instance running.
> Note: Optionally you can choose to deploy a branch `without-postgres` and configure database env, if you already have a postgres instance running.

<img src="/images/render_1.png" style="height:20em;width:100%;object-fit:contain;"/>
### Step 2: Configure Required Variables

### Step 2: Configure Envs
Authorizer v2 requires the following variables. Configure them in Render's environment settings:

Open authorizer URL in your browser and configure rest of your [envs](https://docs.authorizer.dev/core/env).
| Variable | Description | Example |
| -------- | ----------- | ------- |
| `DATABASE_TYPE` | Database type | `postgres` |
| `DATABASE_URL` | Database connection string | *(auto-configured by Render)* |
| `JWT_TYPE` | JWT signing algorithm | `HS256` |
| `JWT_SECRET` | JWT signing secret | `test` |
| `ADMIN_SECRET` | Admin secret for admin operations | `admin` |
| `CLIENT_ID` | Client identifier **(required)** | `123456` |
| `CLIENT_SECRET` | Client secret **(required)** | `secret` |

> Note: `DATABASE_URL` and `DATABASE_TYPE` are only configurable via render envs
These are mapped to CLI flags at startup. Please refer to the [server configuration docs](https://docs.authorizer.dev/core/server-config) for all available flags.

<img src="/images/render_2.png" style="height:20em;width:100%;object-fit:contain;"/>
## Notes

That's all 🎉 you can get started with [Authorizer](https://docs.authorizer.dev/getting-started) now! You have your authentication and authorization layer ready.
- Source repo: https://github.com/authorizerdev/authorizer
- Docs: https://docs.authorizer.dev/deployment/render/

### Updating Authorizer on existing Render instance

- You can update the [docker image](https://github.com/authorizerdev/authorizer-render/blob/main/Dockerfile#L2) to the desired version in your repository which gets created with your deployment.

- You can find all the versions on [github](https://github.com/authorizerdev/authorizer/releases) or [dockerhub](https://hub.docker.com/r/lakhansamani/authorizer)
13 changes: 13 additions & 0 deletions render.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,18 @@ services:
property: connectionString
- key: DATABASE_TYPE
value: postgres
- key: CLIENT_ID
generateValue: true
- key: CLIENT_SECRET
generateValue: true
- key: ADMIN_SECRET
generateValue: true
- key: JWT_SECRET
generateValue: true
- key: JWT_TYPE
value: HS256

databases:
- name: authorizer-db
plan: free
databaseName: authorizer