Skip to content
This repository was archived by the owner on May 21, 2025. It is now read-only.

WIP OPGOPS-1771 Add containerised CA#128

Open
Andreas K (carinadigital) wants to merge 27 commits into
masterfrom
OPGOPS-1771
Open

WIP OPGOPS-1771 Add containerised CA#128
Andreas K (carinadigital) wants to merge 27 commits into
masterfrom
OPGOPS-1771

Conversation

@carinadigital
Copy link
Copy Markdown
Contributor

No description provided.

@carinadigital
Copy link
Copy Markdown
Contributor Author

Needs readme for parameters to use both base and ca containers

},
"auth_keys": {
"key1": {
"key": "{{if exists "/opg/base/cakey" }}{{getv "/opg/base/cakey"}}{{end}}",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I like cakey, but should this not be ca/key rather?

Copy link
Copy Markdown
Contributor Author

@carinadigital Andreas K (carinadigital) Feb 27, 2017

Choose a reason for hiding this comment

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

I tried to create only a single level for my variables. Extra hierarchy is more confusing imo.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Yes and no, you have csr/xxx variables as well, just think it's a tiny bit clearer than cakey :)

Though it is pendantry and I am getting quite fond of cake in code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Lets come to a standard and I'll alter it.

"auth_key": "server",
"expiry": "8760h",
"usages": [
"signing",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

shouldn't the server profiles keys also have a whitelist

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Nothing used the server profile so far. Clients can all remote sign their certs using client profile.
Not sure what server auth adds into the mix here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Confirmed that server profile usage extensions to the SSL cert allow it to be used for web server use.

@carinadigital Andreas K (carinadigital) changed the title OPGOPS-1771 Add containerised CA WIP OPGOPS-1771 Add containerised CA Feb 27, 2017
Comment thread ca/README.md

`OPG_CA_CLIENTNAMEWHITELIST` - Regex string to limit the domains that will be signed for the client signing profile. Backslashes must be escaped for use in the json template.

`OPG_CA_CSR_CN`, `OPG_BASE_CSR_CN` - The `common name` attribute of the certificate.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do we want to have both these certs on th CA? We could remove the base container CFSSL SSL cert gen or reuse SKIP_SSL_GENERATE

keys = [
"/opg/base/csr/cn",
"/opg/base/csr/hosts",
"/opg/base/csr_cn",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Won't this get exploded to /opg/base/csr/cn by conf_d?

Comment thread base/docker/my_init.d/90-cfssl-gencert Outdated
[ -s "$CONF_DIR/server-key.pem" ] && \
[ -s "$CONF_DIR/server.pem" ] && \
[ -s "$CONF_DIR/server.csr" ] \
[ -s "$CONF_DIR/$PROFILE-key.pem" ] && \
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Probably a stupid question but isn't "${PROFILE}" safer for interpolation?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yep it's safer. Changing

@@ -0,0 +1,29 @@
{
{{if exists "/opg/base/csr/cn"}}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this conflicts with your variable declared in cert_csr.json.toml

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants