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

Allow dash in account name #806

Merged
merged 2 commits into from
Dec 2, 2020
Merged

Allow dash in account name #806

merged 2 commits into from
Dec 2, 2020

Conversation

louisruch
Copy link
Collaborator

@louisruch louisruch commented Dec 1, 2020

What does this PR do

Resolves #759
Relaxes the regex constraint to allow - (dash) as a valid character in an account login name

Testing

Updated unit tests
I verified that password do accept all characters mentioned in the issue (hyphen, underscore and period)
Performed manual testing:

Before changes:

boundary accounts create password -auth-method-id ampw_1234567890 -login-name admin-tester
Password is not set as flag, please enter it now (will be hidden):
Error from the controller when performing create on password-type account:
Error information:
  Code:                Internal
  Error ID:            YqlVyFuvqc
  Message:
  Status:              500

Server logs error:

2020-12-01T13:10:23.671-0800 [ERROR] controller: internal error returned: error id=YqlVyFuvqc error="unable to create user: create: password account: invalid login name; must be all-lowercase alphanumeric: invalid parameter: parameter violation: error #100"

After changes:

boundary accounts create password -auth-method-id ampw_1234567890 -login-name admin-tester
Password is not set as flag, please enter it now (will be hidden):

Account information:
  Auth Method ID:      ampw_1234567890
  Created Time:        Tue, 01 Dec 2020 13:08:55 PST
  ID:                  apw_jQ1DKAWgQk
  Type:                password
  Updated Time:        Tue, 01 Dec 2020 13:08:55 PST
  Version:             1

  Scope:
    ID:                global
    Name:              global
    Type:              global

  Attributes:
    Login Name:        admin-tester

@hashicorp-cla
Copy link

hashicorp-cla commented Dec 1, 2020

CLA assistant check
All committers have signed the CLA.

Update changelog
@louisruch louisruch force-pushed the louis/AllowDashAccountName branch from be59706 to 08d18ba Compare December 1, 2020 21:28
@louisruch louisruch requested a review from jefferai December 1, 2020 21:28
@louisruch louisruch merged commit d8f8d60 into main Dec 2, 2020
@louisruch louisruch deleted the louis/AllowDashAccountName branch December 2, 2020 17:56
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.

Unable to use _ or any - in user account
4 participants