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

error: username or group is not a DNS-1123 hostname #80

Closed
brosner opened this issue Apr 28, 2018 · 8 comments
Closed

error: username or group is not a DNS-1123 hostname #80

brosner opened this issue Apr 28, 2018 · 8 comments

Comments

@brosner
Copy link

brosner commented Apr 28, 2018

I am seeing this error by largely following the documentation. Groups in example.yaml and from the Kubernetes docs typically have a colon in them. For example system:masters. However, this is failing authentication because they don't conform. I am not sure whether I should be changing the group name or if this constraint is either in the wrong place or should be removed altogether?

@christopherhein
Copy link
Member

@nckturner @mattmoyer I was digging into the username fields in https://github.com/kubernetes/kubernetes and it doesn't look like they have any validation on the field. Do you know of anything different?

@jutley
Copy link

jutley commented Jan 21, 2019

I just ran into this issue. I do not see anything in Kubernetes that says that usernames have the restrictions that this project imposes.

The closest thing I could find is the restrictions on resource names, and labels.

Furthermore, our current setup uses users with "Firstname Lastname" as their username, which doesn't match DNS-1123. In the official documentation, the sample username is an email address (which we would like to move to), which also does not match DNS-1123.

I think this bit of validation needs to be removed. From what I can tell, I think we just need to edit this code as follows:

template = strings.Replace(template, "{{SessionName}}", identity.SessionName, -1)

@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 28, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 28, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@richardmarshall
Copy link
Contributor

I ran into this as well. Given that k8s doesn't place a dns-1123 restriction on usernames or groups I definitely think this check as well as the replacement of @s should be removed.

Additionally the current regex used to check if a user/group name is conforming contains an error.

"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"

The expression isn't end/beginning of line anchored so it will match any string that contains a sub-string that is a valid dns-1123 name.

/reopen
/remove-lifecycle rotten

@k8s-ci-robot
Copy link
Contributor

@richardmarshall: You can't reopen an issue/PR unless you authored it or you are a collaborator.

In response to this:

I ran into this as well. Given that k8s doesn't place a dns-1123 restriction on usernames or groups I definitely think this check as well as the replacement of @s should be removed.

Additionally the current regex used to check if a user/group name is conforming contains an error.

"[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"

The expression isn't end/beginning of line anchored so it will match any string that contains a sub-string that is a valid dns-1123 name.

/reopen
/remove-lifecycle rotten

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Aug 30, 2019
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

No branches or pull requests

6 participants