Skip to content

request-cert allows invalid names on command line #21

Description

@dpkirchner

request-cert allows you to pass an invalid username on its command line (./request-cert -user foo_bar or ./request-cert -user foo-bar). In both cases the CSR will be created and can be approved, however:

foo_bar:

When it comes time to save the foo_bar certificate secret K8S rejects it with the error:

2019/07/03 23:29:18 could not store secrets: Secret "default.client.foo_bar" is invalid: metadata.name: Invalid value: "default.client.foo_bar": a DNS-1123 subdomain must consist of lower case alphanumeric characters, '-' or '.', and must start and end with an alphanumeric character (e.g. 'example.com', regex used for validation is '[a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*')

foo-bar:

Dashes are not allowed in cockroachdb usernames.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions