Skip to content

Commit 2a99337

Browse files
committed
feat(apiserver): Optionally restrict public API to a single client
# Issue As a platform operator you might want to restrict access to the public API. # Fix The property `autoscaler.apiserver.autoscaler_api_client_id`, if set, restricts the public API endpoint, to only allow requests providing an oauth token from this client id to access the public API. The token needs to be provided in the request header `X-Autoscaler-Token`.
1 parent 5bb46fb commit 2a99337

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

jobs/golangapiserver/spec

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,11 @@ properties:
7070
description: ""
7171
autoscaler.apiserver.broker.server.dashboard_redirect_uri:
7272
description: ""
73+
autoscaler.apiserver.public_api.autoscaler_api_client_id:
74+
description: |
75+
If set, restricts the public API endpoint, to only allow requests providing an oauth token from this client id to access the public API.
76+
The token needs to be provided in the request header X-Autoscaler-Token.
77+
default: ""
7378
autoscaler.apiserver.public_api.server.port:
7479
description: "Port where broker server will run"
7580
default: 6102

jobs/golangapiserver/templates/apiserver.yml.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ cf:
5757
idle_connection_timeout_ms: <%= p("autoscaler.cf.idle_connection_timeout_ms") %>
5858
max_idle_conns_per_host_ms: <%= p("autoscaler.cf.max_idle_conns_per_host_ms") %>
5959

60+
api_client_id: <%= p("autoscaler.apiserver.public_api.autoscaler_api_client_id") %>
6061
public_api_server:
6162
port: <%= p("autoscaler.apiserver.public_api.server.port") %>
6263
<% if_p("autoscaler.apiserver.public_api.server.ca_cert", "autoscaler.apiserver.public_api.server.server_cert", "autoscaler.apiserver.public_api.server.server_key") do %>

0 commit comments

Comments
 (0)