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

Certificates in templates #32

Merged
merged 6 commits into from
Jan 6, 2022
Merged

Certificates in templates #32

merged 6 commits into from
Jan 6, 2022

Conversation

maraino
Copy link
Contributor

@maraino maraino commented Dec 29, 2021

Description

This PR adds fixed keys and methods to add certificates and certificate chains to the templates. If a provisioner adds those methods they will be accessible from the template like {{ .AuthorizationCrt }} or {{ .AuthorizationChain }}.

@maraino maraino requested a review from dopey December 29, 2021 23:44
@tashian
Copy link

tashian commented Dec 30, 2021

Hey @maraino I just started putting some docs together for this.
Where can I find the list of properties that are available in the template, for .Crt and .Chain?

@@ -134,6 +136,18 @@ func (t TemplateData) SetUserData(v interface{}) {
t.SetInsecure(UserKey, v)
}

// SetCertificate sets a the given certificate in the template. This certificate
Copy link
Contributor

Choose a reason for hiding this comment

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

sets the given - remove a

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed with b9132b1

Copy link
Contributor

@dopey dopey left a comment

Choose a reason for hiding this comment

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

lgtm. left one comment.

@maraino maraino requested a review from tashian January 3, 2022 20:39
@maraino maraino merged commit 1648110 into master Jan 6, 2022
@maraino maraino deleted the template-certs branch January 6, 2022 20:46
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.

None yet

3 participants