Skip to content

Commit

Permalink
resolve minor TODOs (#47777)
Browse files Browse the repository at this point in the history
* resolve minor TODOs

* fix terraform docs
  • Loading branch information
nklaassen authored Oct 22, 2024
1 parent f8bcf4b commit 93a548c
Show file tree
Hide file tree
Showing 11 changed files with 11 additions and 13 deletions.
3 changes: 2 additions & 1 deletion api/client/proto/joinservice.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion api/proto/teleport/legacy/client/proto/joinservice.proto
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ import "teleport/legacy/types/types.proto";

option go_package = "github.com/gravitational/teleport/api/client/proto";

// TODO(nklaassen): Document me.
// RegisterUsingIAMMethodRequest is a request for registration via the IAM join
// method.
message RegisterUsingIAMMethodRequest {
// RegisterUsingTokenRequest holds registration parameters common to all
// join methods.
Expand Down
3 changes: 2 additions & 1 deletion api/proto/teleport/legacy/types/types.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2095,7 +2095,8 @@ message AuthPreferenceSpecV2 {
HardwareKey HardwareKey = 19 [(gogoproto.jsontag) = "hardware_key,omitempty"];

// SignatureAlgorithmSuite is the configured signature algorithm suite for the cluster.
// The current default value is "legacy". This field is not yet fully supported.
// If unspecified, the current default value is "legacy".
// 1 is "legacy", 2 is "balanced-v1", 3 is "fips-v1", 4 is "hsm-v1".
SignatureAlgorithmSuite signature_algorithm_suite = 20;

// SecondFactors is a list of supported second factor types.
Expand Down
3 changes: 2 additions & 1 deletion api/types/types.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Optional:
- `require_session_mfa` (Number) RequireMFAType is the type of MFA requirement enforced for this cluster. 0 is "OFF", 1 is "SESSION", 2 is "SESSION_AND_HARDWARE_KEY", 3 is "HARDWARE_KEY_TOUCH", 4 is "HARDWARE_KEY_PIN", 5 is "HARDWARE_KEY_TOUCH_AND_PIN".
- `second_factor` (String) SecondFactor is the type of mult-factor.
- `second_factors` (List of Number) SecondFactors is a list of supported second factor types.
- `signature_algorithm_suite` (Number) SignatureAlgorithmSuite is the configured signature algorithm suite for the cluster. The current default value is "legacy". This field is not yet fully supported.
- `signature_algorithm_suite` (Number) SignatureAlgorithmSuite is the configured signature algorithm suite for the cluster. If unspecified, the current default value is "legacy". 1 is "legacy", 2 is "balanced-v1", 3 is "fips-v1", 4 is "hsm-v1".
- `type` (String) Type is the type of authentication.
- `u2f` (Attributes) U2F are the settings for the U2F device. (see [below for nested schema](#nested-schema-for-specu2f))
- `webauthn` (Attributes) Webauthn are the settings for server-side Web Authentication support. (see [below for nested schema](#nested-schema-for-specwebauthn))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Optional:
- `require_session_mfa` (Number) RequireMFAType is the type of MFA requirement enforced for this cluster. 0 is "OFF", 1 is "SESSION", 2 is "SESSION_AND_HARDWARE_KEY", 3 is "HARDWARE_KEY_TOUCH", 4 is "HARDWARE_KEY_PIN", 5 is "HARDWARE_KEY_TOUCH_AND_PIN".
- `second_factor` (String) SecondFactor is the type of mult-factor.
- `second_factors` (List of Number) SecondFactors is a list of supported second factor types.
- `signature_algorithm_suite` (Number) SignatureAlgorithmSuite is the configured signature algorithm suite for the cluster. The current default value is "legacy". This field is not yet fully supported.
- `signature_algorithm_suite` (Number) SignatureAlgorithmSuite is the configured signature algorithm suite for the cluster. If unspecified, the current default value is "legacy". 1 is "legacy", 2 is "balanced-v1", 3 is "fips-v1", 4 is "hsm-v1".
- `type` (String) Type is the type of authentication.
- `u2f` (Attributes) U2F are the settings for the U2F device. (see [below for nested schema](#nested-schema-for-specu2f))
- `webauthn` (Attributes) Webauthn are the settings for server-side Web Authentication support. (see [below for nested schema](#nested-schema-for-specwebauthn))
Expand Down
2 changes: 1 addition & 1 deletion integrations/terraform/tfschema/types_terraform.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions lib/auth/bot.go
Original file line number Diff line number Diff line change
Expand Up @@ -288,8 +288,6 @@ func (a *Server) updateBotInstance(
}
}

// TODO(nklaassen): consider recording both public keys once they are
// actually separated.
var publicKeyPEM []byte
if req.tlsPublicKey != nil {
publicKeyPEM = req.tlsPublicKey
Expand Down
1 change: 0 additions & 1 deletion lib/auth/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -1244,7 +1244,6 @@ func checkResourceConsistency(ctx context.Context, keyStore *keystore.Manager, c

// GenerateIdentity generates identity for the auth server
func GenerateIdentity(a *Server, id state.IdentityID, additionalPrincipals, dnsNames []string) (*state.Identity, error) {
// TODO(nklaassen): split SSH and TLS keys for host identities.
key, err := cryptosuites.GenerateKey(context.Background(), cryptosuites.GetCurrentSuiteFromAuthPreference(a), cryptosuites.HostIdentity)
if err != nil {
return nil, trace.Wrap(err)
Expand Down
1 change: 0 additions & 1 deletion lib/cryptosuites/suites.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ const (
// HostSSH represents a host SSH key.
HostSSH
// HostIdentity represents a key used for a Teleport host identity.
// TODO(nklaassen): split SSH and TLS keys used for host identities.
HostIdentity

// BotImpersonatedIdentity represents a key used for a general impersonated
Expand Down
2 changes: 0 additions & 2 deletions lib/reversetunnel/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,6 @@ func (c *certificateCache) generateHostCert(ctx context.Context, principals []st
return nil, trace.Wrap(err)
}

// TODO(nklaassen): request only an SSH cert, we don't need TLS here.
// GenerateHostCert needs support for this.
res, err := c.authClient.TrustClient().GenerateHostCert(ctx, &trustpb.GenerateHostCertRequest{
Key: pubBytes,
HostId: principals[0],
Expand Down

0 comments on commit 93a548c

Please sign in to comment.