Skip to content

Commit f95a994

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 8b393ff commit f95a994

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
@@ -73,6 +73,11 @@ properties:
7373
description: ""
7474
autoscaler.apiserver.broker.server.dashboard_redirect_uri:
7575
description: ""
76+
autoscaler.apiserver.public_api.autoscaler_api_client_id:
77+
description: |
78+
If set, restricts the public API endpoint, to only allow requests providing an oauth token from this client id to access the public API.
79+
The token needs to be provided in the request header X-Autoscaler-Token.
80+
default: ""
7681
autoscaler.apiserver.public_api.server.port:
7782
description: "Port where broker server will run"
7883
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)