Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
4bb28082
Commit
4bb28082
authored
Nov 15, 2016
by
deads2k
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
allow front-proxy authentication by default:
parent
4c504867
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
local-up-cluster.sh
hack/local-up-cluster.sh
+18
-2
No files found.
hack/local-up-cluster.sh
View file @
4bb28082
...
...
@@ -397,6 +397,12 @@ function start_apiserver {
if
[[
-n
"
${
ALLOW_ANY_TOKEN
:-}
"
]]
;
then
anytoken_arg
=
"--insecure-allow-any-token "
fi
auth_proxy_arg
=
""
if
[[
-n
"
${
ENABLE_AUTH_PROXY
:-}
"
]]
;
then
auth_proxy_arg
=
"--requestheader-username-headers=X-Remote-User
\
--requestheader-client-ca-file=
${
CERT_DIR
}
/auth-proxy-client-ca.crt
\
--requestheader-allowed-names=system:auth-proxy "
fi
authorizer_arg
=
""
if
[[
-n
"
${
ENABLE_RBAC
:-}
"
]]
;
then
authorizer_arg
=
"--authorization-mode=RBAC "
...
...
@@ -432,12 +438,22 @@ EOF
create_client_certkey client-ca scheduler system:scheduler system:masters
create_client_certkey client-ca admin system:admin system:cluster-admins
# Create auth proxy client ca
sudo
/bin/bash
-e
<<
EOF
rm -f "
${
CERT_DIR
}
/auth-proxy-client-ca.crt" "
${
CERT_DIR
}
/auth-proxy-client-ca.key"
openssl req -x509 -sha256 -new -nodes -days 365 -newkey rsa:2048 -keyout "
${
CERT_DIR
}
/auth-proxy-client-ca.key" -out "
${
CERT_DIR
}
/auth-proxy-client-ca.crt" -subj "/C=xx/ST=x/L=x/O=x/OU=x/CN=ca/emailAddress=x/"
echo '{"signing":{"default":{"expiry":"43800h","usages":["signing","key encipherment","client auth"]}}}' > "
${
CERT_DIR
}
/auth-proxy-client-ca-config.json"
EOF
create_client_certkey auth-proxy-client-ca auth-proxy system:auth-proxy
sudo
bash
-c
"cat '
${
CERT_DIR
}
/client-ca.crt' '
${
CERT_DIR
}
/auth-proxy-client-ca.crt' > '
${
CERT_DIR
}
/client-ca-bundle.crt'"
APISERVER_LOG
=
/tmp/kube-apiserver.log
${
CONTROLPLANE_SUDO
}
"
${
GO_OUT
}
/hyperkube"
apiserver
${
anytoken_arg
}
${
authorizer_arg
}
${
priv_arg
}
${
runtime_config
}
\
${
CONTROLPLANE_SUDO
}
"
${
GO_OUT
}
/hyperkube"
apiserver
${
anytoken_arg
}
${
auth
_proxy_arg
}
${
auth
orizer_arg
}
${
priv_arg
}
${
runtime_config
}
\
${
advertise_address
}
\
--v
=
${
LOG_LEVEL
}
\
--cert-dir
=
"
${
CERT_DIR
}
"
\
--client-ca-file
=
"
${
CERT_DIR
}
/client-ca.crt"
\
--client-ca-file
=
"
${
CERT_DIR
}
/client-ca
-bundle
.crt"
\
--service-account-key-file
=
"
${
SERVICE_ACCOUNT_KEY
}
"
\
--service-account-lookup
=
"
${
SERVICE_ACCOUNT_LOOKUP
}
"
\
--admission-control
=
"
${
ADMISSION_CONTROL
}
"
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment