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

Add server_ca_client_self_delete to CA Servers #728

Merged
merged 2 commits into from
Mar 23, 2020

Conversation

neilfromit
Copy link
Contributor

Add the server_ca_client_self_delete boolean parameter to CA servers.
When true, allow puppet clients to delete their own certificate from
the Puppet CA.

Add the server_ca_client_self_delete boolean parameter to CA servers.
When true, allows puppet clients to delete their own certificate from
the Puppet CA.
@neilfromit
Copy link
Contributor Author

Just to expand a little more, the use case for this feature for me was to allow for puppet agent certificate self renewal. I'm using the reidmv/puppet-module-puppet_certificate in particular to achieve this. Ideally auth.conf should be a little less static but this was the simpler commit for now. I've included a basic spec test.

Spec test that checks config is not added with default parameters set.
@mmoll mmoll merged commit f29b7dd into theforeman:master Mar 23, 2020
@mmoll
Copy link
Contributor

mmoll commented Mar 23, 2020

merged, thanks @neilfromit!

@neilfromit neilfromit deleted the FEAT-custom-auth-rules branch March 23, 2020 22:39
@neilfromit
Copy link
Contributor Author

Awesome! Thanks for reviewing it.

foxxx0 added a commit to foxxx0/puppet-puppet that referenced this pull request Jun 2, 2020
During theforeman#728 a regression was introduced, denying the other whitelisted
admin clients cleaning/deletion of certificates:

```
2020-06-02T16:30:47.856+02:00 ERROR [qtp1105504743-114201] [p.t.a.rules] Forbidden request: puppetserver01.[...] access to /puppet-ca/v1/certificate_status/my.fancy.hostname (method :delete) (authenticated: true) denied by rule 'Allow nodes to delete their own certificates'.
```

The solution is to re-allow the entries within
`@server_admin_api_whitelist`, which usually contain "localhost" and the
fqdn of the puppetserver CA system.
foxxx0 added a commit to foxxx0/puppet-puppet that referenced this pull request Jun 2, 2020
During theforeman#728 a regression was introduced, denying the other whitelisted
admin clients cleaning/deletion of certificates:

```
2020-06-02T16:30:47.856+02:00 ERROR [qtp1105504743-114201] [p.t.a.rules] Forbidden request: puppetserver01.[...] access to /puppet-ca/v1/certificate_status/my.fancy.hostname (method :delete) (authenticated: true) denied by rule 'Allow nodes to delete their own certificates'.
```

The solution is to re-allow the entries within
`@server_admin_api_whitelist`, which usually contain "localhost" and the
fqdn of the puppetserver CA system.
ekohl pushed a commit that referenced this pull request Jun 10, 2020
During #728 a regression was introduced, denying the other whitelisted
admin clients cleaning/deletion of certificates:

```
2020-06-02T16:30:47.856+02:00 ERROR [qtp1105504743-114201] [p.t.a.rules] Forbidden request: puppetserver01.[...] access to /puppet-ca/v1/certificate_status/my.fancy.hostname (method :delete) (authenticated: true) denied by rule 'Allow nodes to delete their own certificates'.
```

The solution is to re-allow the entries within
`@server_admin_api_whitelist`, which usually contain "localhost" and the
fqdn of the puppetserver CA system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants