-
Notifications
You must be signed in to change notification settings - Fork 166
[LG-16274] Limit character length on user supplied names for auth_app_configuration, piv_cac_configuration, and webauthn_configuration #12760
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
Merged
Merged
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f524678
wip
joshuaalley25 5432ee1
changelog: Bug Fixes, user input limits, adding character limits to u…
joshuaalley25 5f604e3
adjust factories for new character limits on user supplied names
joshuaalley25 d14f679
rubo fixes
joshuaalley25 d2ae25f
adjust character limit
joshuaalley25 2ab449a
remove old commented code
joshuaalley25 cef6213
Adjust character limit to 20
joshuaalley25 d620572
adjust WebauthnConfiguration name length to handle platform authentic…
joshuaalley25 41cd3ea
Add unit tests for name length validations
joshuaalley25 34ce67a
remove binding
joshuaalley25 b5c809c
Reverting nonunique names for configurations
joshuaalley25 c2bbe0f
Adjusting stubs for configuration names
joshuaalley25 c356791
Merge branch 'main' into jralley/LG-17274-limit-mfa-field-lengths
joshuaalley25 2a98679
Shorten length of SP friendly name stubs
joshuaalley25 8cf0fad
revert friendly name changes
joshuaalley25 2700731
remove pry
joshuaalley25 8b5150b
create concern for max length constants in models
joshuaalley25 b43c1e4
lint
joshuaalley25 4288556
refine unit tests using context
joshuaalley25 abe1660
update override constant name
joshuaalley25 d569659
update factories to use constants
joshuaalley25 3b81221
Merge branch 'main' into jralley/LG-17274-limit-mfa-field-lengths
joshuaalley25 1edf180
update webauthn max length constant
joshuaalley25 9aa143f
remove errant imports
joshuaalley25 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| require 'rails_helper' | ||
|
|
||
| RSpec.describe AuthAppConfiguration do | ||
| describe 'Associations' do | ||
| it { is_expected.to belong_to(:user) } | ||
| end | ||
|
|
||
| describe 'name validations' do | ||
| it 'is invalid when name is longer than 20 characters' do | ||
| config = AuthAppConfiguration.new( | ||
| name: 'a' * 21, | ||
joshuaalley25 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| ) | ||
|
|
||
| expect(config).not_to be_valid | ||
| end | ||
|
|
||
| it('is valid when name has exactly 20 characters') do | ||
| config = AuthAppConfiguration.new( | ||
| name: 'a' * 20, | ||
| ) | ||
|
|
||
| expect(config).to be_valid | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| require 'rails_helper' | ||
|
|
||
| RSpec.describe PivCacConfiguration do | ||
| describe 'Associations' do | ||
| it { is_expected.to belong_to(:user) } | ||
| end | ||
|
|
||
| describe 'name validations' do | ||
| it 'is invalid when name is longer than 20 characters' do | ||
joshuaalley25 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| config = PivCacConfiguration.new( | ||
| name: 'a' * 21, | ||
| ) | ||
|
|
||
| expect(config).not_to be_valid | ||
| end | ||
|
|
||
| it('is valid when name has exactly 20 characters') do | ||
| config = PivCacConfiguration.new( | ||
| name: 'a' * 20, | ||
| ) | ||
|
|
||
| expect(config).to be_valid | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.