Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tighten bootstrap policy #885

Merged

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Feb 4, 2015

Start separating roles for system components.
Separate role bindings for different components.
Prefix system generated users with system:
Separate out the insecure-cluster-admins
Update tests to run fully secure (no rights for system:authenticated or system:unauthenticated)

@liggitt

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 53bbe95 to fd18b24 Compare February 4, 2015 20:35
@smarterclayton
Copy link
Contributor

This is post beta1 right?

@smarterclayton smarterclayton added this to the 0.4.0 (beta2) milestone Feb 4, 2015
@liggitt
Copy link
Contributor

liggitt commented Feb 5, 2015

Yeah, beta2

@deads2k
Copy link
Contributor Author

deads2k commented Feb 5, 2015

Oh the lack of confidence! ;)

@@ -74,20 +74,21 @@ OPENSHIFT_ON_PANIC=crash openshift start --master="${API_SCHEME}://${API_HOST}:$
OS_PID=$!

if [[ "${API_SCHEME}" == "https" ]]; then
export CURL_CA_BUNDLE="${CERT_DIR}/admin/root.crt"
export CURL_CA_BUNDLE="${CERT_DIR}/system:admin/root.crt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you change directories, we need to make sure we update ALL the places that reference it (docs, howtos, scripts to copy things to minion vagrant images, etc). Probably easier to leave the directory alone and just add the provider name in the cert itself.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Colons in paths break windows, let's leave directories non-provider qualified for now

@liggitt
Copy link
Contributor

liggitt commented Feb 6, 2015

Add a bootstrap role for deleting oAuthAccessTokens and bind it to system:authenticated, system:unauthenticated
Do we need to exclude oauthclients, oauthclientauthorizations, oauthaccesstokens, oauthauthorizetokens from admin/edit/view?

@liggitt
Copy link
Contributor

liggitt commented Feb 6, 2015

See https://github.com/liggitt/origin/commit/86ebd5e2327a69edfec764f62cb5c3c9f2434f23 for an initial stab at adding groups to certs

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 6bbd2f4 to c725bd7 Compare February 6, 2015 17:05
@deads2k
Copy link
Contributor Author

deads2k commented Feb 6, 2015

I'd like to limit creep by adding groups later. There's no way to admin them now and our rule language is probably changing, so the description of the roles may still change. This just makes sure each individual piece is working.

Given a working login page, I'm inclined to actually remove the insecure-cluster-admin-binding. Is there any reason to keep it besides fear? Friday?

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from c725bd7 to 4bd1255 Compare February 6, 2015 17:13
@deads2k
Copy link
Contributor Author

deads2k commented Feb 6, 2015

Comments addressed.

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 4bd1255 to 03dd54d Compare February 6, 2015 17:34
@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_openshift3/1046/)

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 85e504c to 127c188 Compare February 6, 2015 20:51
[vagrant@openshiftdev origin]$ export OPENSHIFT_CA_DATA=$(<$CERT_DIR/master/root.crt)

[vagrant@openshiftdev origin]$ hack/install-router.sh {router_id} {master_url}
[vagrant@openshiftdev origin]$ CERT_DIR=$CERT_DIR/master hack/install-router.sh {router_id} {master_url}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that actually should be CERT_DIR=$CERT_DIR/openshift-client, right? You can't use the master server certs as a client certificate... if that was copied from the registry readme, it needs changing there as well

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 127c188 to a0c4851 Compare February 9, 2015 12:50
@deads2k
Copy link
Contributor Author

deads2k commented Feb 9, 2015

Doc tweak and commits squashed.

OPENSHIFT_CERT_DATA="${OPENSHIFT_CERT_DATA//$'\n'/\\\\n}"
OPENSHIFT_KEY_DATA="${OPENSHIFT_KEY_DATA//$'\n'/\\\\n}"


if [[ "$OPENSHIFT_CA_DATA" == "" ]]; then
echo "Running against an HTTPS master (${MASTER_URL}) without a trusted certificate bundle."
echo "Set \$OPENSHIFT_CA_DATA to the contents of the root certificate bundle to start securely next time."
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops... update this to describe the correct invocation (CERT_DIR=openshift.local.certificates/openshift-client ...)

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from a0c4851 to a3bcddf Compare February 9, 2015 14:29
@deads2k
Copy link
Contributor Author

deads2k commented Feb 9, 2015

fixed up the echo.

@liggitt
Copy link
Contributor

liggitt commented Feb 9, 2015

[test]

set +e
for i in $(seq 1 $times); do
out=$(curl -fs $url 2>/dev/null)
out=$(curl ${clientcert_args} -fs $url 2>/dev/null)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add ${clientcert_args} below to the final curl invocation so we don't surface a misleading error message

@@ -164,23 +164,25 @@ OS_PID=$!

if [[ "${API_SCHEME}" == "https" ]]; then
export CURL_CA_BUNDLE="${CERT_DIR}/master/root.crt"
export CURL_CERT="${CERT_DIR}/admin/cert.crt"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fix indent

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tabs in this file are two spaces (chosen before me). You want me to change them all?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird, just saw the mismatch in the github displayed indent

@deads2k
Copy link
Contributor Author

deads2k commented Feb 10, 2015

@liggitt Changed tabs in a separate commit. Do we change cruft like this? Let it live forever? Have separate formatting commits?

@liggitt
Copy link
Contributor

liggitt commented Feb 10, 2015

LGTM

@smarterclayton
Copy link
Contributor

Squash and I'll merge

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from a770b11 to 8770bd2 Compare February 10, 2015 16:15
@deads2k
Copy link
Contributor Author

deads2k commented Feb 10, 2015

@smarterclayton rebased and squashed

OPENSHIFT_KEY_DATA="$(cat "${CERT_DIR}/key.key")"
fi

# I don't know how to do this inline with bash and it's logically a separate step we want to remove anyway
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this comment?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed.

@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 8770bd2 to 23e098d Compare February 10, 2015 17:50
@deads2k deads2k force-pushed the deads-tighten-bootstrap-policy branch from 23e098d to 466b5c3 Compare February 10, 2015 18:10
@deads2k
Copy link
Contributor Author

deads2k commented Feb 10, 2015

finally, mostly green tests.

@smarterclayton
Copy link
Contributor

[merge]

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/merge_pull_requests_openshift3/879/) (Image: devenv-fedora_753)

@openshift-bot
Copy link
Contributor

Evaluated for origin up to 466b5c3

openshift-bot pushed a commit that referenced this pull request Feb 10, 2015
@openshift-bot openshift-bot merged commit 9cc0544 into openshift:master Feb 10, 2015
@deads2k deads2k deleted the deads-tighten-bootstrap-policy branch February 10, 2015 20:13
sjenning pushed a commit to sjenning/origin that referenced this pull request Jan 5, 2018
[3.6] Pruning should keep layers referenced by other images
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Feb 1, 2018
…hift#885)

* sending the appropriate query string parameters in deprovision

… and not sending a request body

Fixes kubernetes-retired/service-catalog#883

* fixing fake broker server

it should no longer require a request body for a DELETE request

* checking the response's error before continuing

* sending params in the query string

as it should be!
jpeeler pushed a commit to jpeeler/origin that referenced this pull request Feb 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants