Commit Graph
7 Commits
Author SHA1 Message Date
8e05bcbb1b Export CRL and Database CA in DER format (#22578)
* feat(tctl): auth export type db der

* feat(tctl): add "crl" command to export revocation lists

* Apply suggestions from code review

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>

* chore(tctl): change command description

* Apply suggestions from code review

Co-authored-by: Marek Smoliński <marek@goteleport.com>

* feat(auth): enable role admin to call generate crl

---------

Co-authored-by: Zac Bergquist <zac.bergquist@goteleport.com>
Co-authored-by: Marek Smoliński <marek@goteleport.com>
2023-03-10 14:30:07 +00:00
42cb80c3e4 Adding in a new SAML IdP certificate authority. (#21159)
* Adding in a new SAML IdP certificate authority.

A new SAML IdP certificate authority has been added. It has been added to
initialization, the cache, and the certificate can be rotated.

* Update lib/services/authority.go

Co-authored-by: Sam Freiberg <sfreiberg@goteleport.com>

* Update api/types/trust.go

Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>

* Only validate private key if it's present.

---------

Co-authored-by: Sam Freiberg <sfreiberg@goteleport.com>
Co-authored-by: Edoardo Spadolini <edoardo.spadolini@goteleport.com>
2023-02-03 15:56:56 +00:00
Andrew LeFevre e71f024a9f Add OpenSSH CA (#20020)
* WIP adding OpenSSH CA

* fix creating OpenSSH CA for tests

* fix a test name and tctl usage flag

* fix 'tctl status' not displaying openssh CA sometimes

* add OpenSSH CA to TestInit_bootstrap, remove TLS key pair

* add OpenSSH CA to a few more places

* make help text of 'tctl auth rotate' more helpful and accurate

* fix web cert export test

* tbot doesn't need to know about OpenSSH CA

* address feedback

* fix comment formatting
2023-01-13 18:23:19 +00:00
Brian Joerger 488af75797 Client store generalization (#19420)
- Add a generalized client store made up of a key, profile, and trusted certs store. Each sub store can support different backends (~/.tsh, identity_file, in-memory). 
- Replace custom identity file handling with in-memory client store.
- Fix issues with trusted certs handling.
2023-01-06 01:34:04 +00:00
Marco André Dinis 8bdcd197f1 Add separation between keys when exporting CAs (#18562)
Adding a new line was sometimes not enough to separate the keys.

This was causing our tests to sometimes fail.
2022-12-05 11:11:59 +00:00
Jakub Nyckowski 0ee91f6c37 Enable GCI linter (#17894) 2022-10-28 20:20:28 +00:00
Marco André Dinis e86e3960d9 Expose tctl auth export as a public endpoint (#15491)
Public endpoint that exports CA Certificates

It supports the same types that we currently support when running `tctl auth export --type=t`
Fix https://github.com/gravitational/teleport/issues/7413

Demo
```
marco@lenix ~> curl --insecure "https://127.0.0.1.nip.io:3080/v1/webapi/sites/lenix/auth/export"
@cert-authority lenix,*.lenix ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC0TxkYYZ+EKHdgA09h/fK0upJzaPe8Sxr63wxPLzqJNDr8O4mxy24UZ08t5tojyaEXHwRLvqOdUBXhbpQpmrUkuN2LLS/k1ijk+V98j+6vWaviL3fDPbZw4PRRl0QtCjAFE/kxH9uLmqvMwnCpeNOQaugq1slVOibDZDrP7FcKmrTzKldk5ohSJSTl0sH6TQzQG2Sj+awXLk7LWcYvE5PN0YVh/S9kzmTpCugaIGd5LOAL3JSuQJ+pwwKmVEg+EPYcbzv7lcLgnew9weCDK0uk4PuNnMXrt1KcCEFttMrceeGnnqOr5JogFLiWL/TP+9kBgleNZhXEaXSz2r1i7pNt type=host
cert-authority ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDHoDSouxSrXq/X+qZWBM8saHEIb3O3dXOfpRtGrkV6LymPpojhzN1dcYKUqYvWYMw2+WOKIyeAgg9p0zrIQaP7AQPP42sjDhB4keJMbSHh43Hnb7pITRBBpsSCGYMr1U1utQDdz1dbzp96OlvXoNL+ltZKPYNBvG7obqlqhFhHV6ReNvb7FT1OSrtC7UEElPyrYgd3+QMBTTNNYg3Lu+712ySKHqjdM6mLG8XWfSbkmLVbKRTcV3qPj6vEnarXHOnATv+AJElkIlaJjx+RmIxEA9AlE+mjxm2PR+uwsFLV+YD20oPWHaqVyKzT3x7/UNQttBTZD1G0D2fwZg2lDO29 clustername=lenix&type=user
marco@lenix ~> curl --insecure "https://127.0.0.1.n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