Skip to content

Add password message to /dashboardsinfo endpoint#2949

Merged
cwperks merged 2 commits intoopensearch-project:mainfrom
cwperks:password-message-dashboards-info
Jul 7, 2023
Merged

Add password message to /dashboardsinfo endpoint#2949
cwperks merged 2 commits intoopensearch-project:mainfrom
cwperks:password-message-dashboards-info

Conversation

@cwperks
Copy link
Member

@cwperks cwperks commented Jul 6, 2023

Description

Companion Security Dashboards Plugin PR: opensearch-project/security-dashboards-plugin#1503

This modifies the /dashboardsinfo endpoint to include the plugins.security.restapi.password_validation_error_message setting or the default message of "Password should be at least 8 characters long and contain at least one uppercase letter, one lowercase letter, one digit, and one special character.". The purpose of adding this to the endpoint is to utilize this message when rendering both the password edit component and password reset component to include the proper message.

  • Category (Enhancement, New feature, Bug fix, Test fix, Refactoring, Maintenance, Documentation)

Bug Fix

Issues Resolved

opensearch-project/security-dashboards-plugin#1501

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Craig Perkins <cwperx@amazon.com>
@codecov
Copy link

codecov bot commented Jul 6, 2023

Codecov Report

Merging #2949 (0bbd73c) into main (4eef662) will decrease coverage by 32.13%.
The diff coverage is 100.00%.

@@              Coverage Diff              @@
##               main    #2949       +/-   ##
=============================================
- Coverage     62.31%   30.19%   -32.13%     
+ Complexity     3337     1537     -1800     
=============================================
  Files           266      266               
  Lines         19650    19652        +2     
  Branches       3329     3329               
=============================================
- Hits          12244     5933     -6311     
- Misses         5779    12753     +6974     
+ Partials       1627      966      -661     
Impacted Files Coverage Δ
...opensearch/security/rest/DashboardsInfoAction.java 77.50% <100.00%> (+1.18%) ⬆️

... and 171 files with indirect coverage changes

DarshitChanpura
DarshitChanpura previously approved these changes Jul 6, 2023
Copy link
Member

@DarshitChanpura DarshitChanpura left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I nit suggestion.

.build();

@Test
public void testNegativeLookaheadPattern() throws Exception {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: testValidationMessageDisplayed. Same for the test in the file above.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woops, forgot to update the name. This is updated now. The push dismissed your review so you will need to re-approve the PR.

willyborankin
willyborankin previously approved these changes Jul 6, 2023
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks dismissed stale reviews from willyborankin and DarshitChanpura via 0bbd73c July 6, 2023 14:17
@RyanL1997
Copy link
Collaborator

LGTM and approved. Thanks @cwperks for taking this on!

Copy link
Contributor

@stephen-crawford stephen-crawford left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! Thanks Craig.

@cwperks cwperks merged commit 47c4feb into opensearch-project:main Jul 7, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jul 7, 2023
* Add password message to /dashboardsinfo endpoint

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Update test names

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 47c4feb)
cwperks added a commit that referenced this pull request Jul 7, 2023
* Add password message to /dashboardsinfo endpoint

Signed-off-by: Craig Perkins <cwperx@amazon.com>

* Update test names

Signed-off-by: Craig Perkins <cwperx@amazon.com>

---------

Signed-off-by: Craig Perkins <cwperx@amazon.com>
(cherry picked from commit 47c4feb)

Co-authored-by: Craig Perkins <cwperx@amazon.com>
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

Successfully merging this pull request may close these issues.

5 participants