Skip to content

[Powerstore+Auth]: Update IP regex to accept localhost as endpoint#555

Merged
riya-kaushal7997 merged 4 commits into
mainfrom
usr/riya/update-ip-regex-to-accept-domain-name
Sep 5, 2025
Merged

[Powerstore+Auth]: Update IP regex to accept localhost as endpoint#555
riya-kaushal7997 merged 4 commits into
mainfrom
usr/riya/update-ip-regex-to-accept-domain-name

Conversation

@riya-kaushal7997

@riya-kaushal7997 riya-kaushal7997 commented Sep 4, 2025

Copy link
Copy Markdown
Contributor

Description

When Auth v2 is enabled, PowerStore secrets provide an endpoint as https://localhost:9400.
Previously, the regex only supported IP addresses, which prevented using localhost or domain-based endpoints.

This change updates the regex validation to accept:

  • localhost
  • Domain names
  • IP addresses (still supported)

This ensures compatibility with Auth v2 configurations and improves flexibility for different endpoint setups.

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1947

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

@riya-kaushal7997 riya-kaushal7997 marked this pull request as draft September 4, 2025 12:05
@riya-kaushal7997 riya-kaushal7997 marked this pull request as ready for review September 4, 2025 19:40
@riya-kaushal7997 riya-kaushal7997 force-pushed the usr/riya/update-ip-regex-to-accept-domain-name branch from 3779c6c to 14fca9a Compare September 4, 2025 21:15
@github-actions

github-actions Bot commented Sep 5, 2025

Copy link
Copy Markdown
Contributor

Merging this branch will not change overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/csi-powerstore/pkg/identifiers 0.00% (ø)

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/csi-powerstore/pkg/identifiers/identifiers.go 0.00% (ø) 0 0 0

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

Changed unit test files

  • github.com/dell/csi-powerstore/pkg/identifiers/identifiers_test.go

@chaganti-rajitha chaganti-rajitha left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM

@riya-kaushal7997 riya-kaushal7997 merged commit dc9662c into main Sep 5, 2025
11 of 12 checks passed
@riya-kaushal7997 riya-kaushal7997 deleted the usr/riya/update-ip-regex-to-accept-domain-name branch September 5, 2025 04:44
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.

3 participants