Skip to content
Closed
Show file tree
Hide file tree
Changes from 15 commits
Commits
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
1 change: 1 addition & 0 deletions changelog.d/2-features/pr-2931
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Endpoints can now be configured to enable OAuth access.
8 changes: 4 additions & 4 deletions charts/nginz/templates/conf/_nginx.conf.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,10 @@ http {
{{- end }}
{{- end }}

{{- if ($location.enable_oauth) }}
oauth on;
{{- end }}

{{- if hasKey $location "specific_user_rate_limit" }}
limit_req zone={{ $location.specific_user_rate_limit }}{{ if hasKey $location "specific_user_rate_limit_burst" }} burst={{ $location.specific_user_rate_limit_burst }}{{ end }} nodelay;
{{- end }}
Expand Down Expand Up @@ -295,10 +299,6 @@ http {
proxy_set_header Connection "";
{{ end -}}

{{- if not ($location.disable_zauth) }}
proxy_set_header Authorization "";
{{- end }}

proxy_set_header Z-Type $zauth_type;
proxy_set_header Z-User $zauth_user;
proxy_set_header Z-Client $zauth_client;
Expand Down
1 change: 1 addition & 0 deletions charts/nginz/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@ nginx_conf:
envs:
- staging
- path: /self$ # Matches exactly /self
enable_oauth: true
envs:
- all
- path: /self/name
Expand Down
2 changes: 2 additions & 0 deletions libs/wire-api/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
, iproute
, iso3166-country-codes
, iso639
, jose
, lens
, lib
, memory
Expand Down Expand Up @@ -152,6 +153,7 @@ mkDerivation {
iproute
iso3166-country-codes
iso639
jose
lens
memory
metrics-wai
Expand Down
Loading