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

Add domain name validation to Go Connector #923

Open
jackwotherspoon opened this issue Jan 24, 2025 · 1 comment · May be fixed by #925
Open

Add domain name validation to Go Connector #923

jackwotherspoon opened this issue Jan 24, 2025 · 1 comment · May be fixed by #925
Assignees
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@jackwotherspoon
Copy link
Collaborator

Add regex to validate domain name used is in proper format.

Similar to how we validate an instance connection name:

// Instance connection name is the format <PROJECT>:<REGION>:<INSTANCE>
// Additionally, we have to support legacy "domain-scoped" projects
// (e.g. "google.com:PROJECT")
connNameRegex = regexp.MustCompile("([^:]+(:[^:]+)?):([^:]+):([^:]+)")

This will allow better error handling as there will be a different error for not being able
to resolve the DNS vs domain name being improperly formatted etc.

@jackwotherspoon jackwotherspoon added priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Jan 24, 2025
@jackwotherspoon jackwotherspoon self-assigned this Jan 24, 2025
@jackwotherspoon jackwotherspoon changed the title Add domain name parsing to Go Connector Add domain name validation to Go Connector Jan 26, 2025
@jackwotherspoon jackwotherspoon linked a pull request Jan 26, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: p1 Important issue which blocks shipping the next release. Will be fixed prior to next release. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant