Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

apple_auth: Change where private key is stored.

Dinesh782970d9f9dd
diff --git a/docs/production/authentication-methods.md b/docs/production/authentication-methods.md
index e6b1389a75a..1282c4326d3 100644
--- a/docs/production/authentication-methods.md
+++ b/docs/production/authentication-methods.md
@@ -588,12 +588,12 @@ domain for your server).
1. Create a [Sign in with Apple private key][apple-create-private-key].
1. Store the resulting private key at
- `/etc/zulip/apple/zulip-private-key.key`. Be sure to set
+ `/etc/zulip/apple-auth-key.p8`. Be sure to set
permissions correctly:
```
- chown -R zulip:zulip /etc/zulip/apple/
- chmod 640 /etc/zulip/apple/zulip-private-key.key
+ chown zulip:zulip /etc/zulip/apple-auth-key.p8
+ chmod 640 /etc/zulip/apple-auth-key.p8
```
1. Configure Apple authentication in `/etc/zulip/settings.py`:
diff --git a/templates/zerver/apple-error.md b/templates/zerver/apple-error.md
index 14fde1bb32e..f39e88e0173 100644
--- a/templates/zerver/apple-error.md
+++ b/templates/zerver/apple-error.md
@@ -10,7 +10,7 @@ properly configured. Please check the following:
`SOCIAL_AUTH_APPLE_BUNDLE_ID`, `SOCIAL_AUTH_APPLE_TEAM`,
`SOCIAL_AUTH_APPLE_KEY` and `SOCIAL_AUTH_APPLE_TEAM` in `{{
settings_path }}` and stored the private key provided by Apple at
- `/etc/zulip/apple/zulip-private-key.key` on the Zulip server, with
+ `/etc/zulip/apple-auth-key.p8` on the Zulip server, with
proper permissions set.
* Navigate back to the login page and attempt the "Sign in with Apple"
diff --git a/zproject/computed_settings.py b/zproject/computed_settings.py
index 0edf3afcd96..5a88ff3c7e4 100644
--- a/zproject/computed_settings.py
+++ b/zproject/computed_settings.py
@@ -1032,7 +1032,7 @@ SOCIAL_AUTH_APPLE_CLIENT = SOCIAL_AUTH_APPLE_SERVICES_ID
SOCIAL_AUTH_APPLE_AUDIENCE = [id for id in [SOCIAL_AUTH_APPLE_CLIENT, SOCIAL_AUTH_APPLE_BUNDLE_ID] if id is not None]
if PRODUCTION:
- SOCIAL_AUTH_APPLE_SECRET = get_from_file_if_exists("/etc/zulip/apple/zulip-private-key.key")
+ SOCIAL_AUTH_APPLE_SECRET = get_from_file_if_exists("/etc/zulip/apple-auth-key.p8")
else:
SOCIAL_AUTH_APPLE_SECRET = get_from_file_if_exists("zproject/dev_apple.key")