-
Notifications
You must be signed in to change notification settings - Fork 282
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 wildcard support for ServiceSkipDomains #2267
add wildcard support for ServiceSkipDomains #2267
Conversation
…omains Signed-off-by: Toshiaki Aoike <taoike@yahoo-corp.jp>
ba012e8
to
124c3d2
Compare
if (domainName.startsWith(serviceSkipDomainPrefix)) { | ||
return; | ||
} | ||
} else if (validateServiceSkipDomains.contains(domainName)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wrong check here to verify against the whole list every time. The correct line would be
} else if (skipDomain.equals(domainName)) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you. I've fixed it.
…list. Signed-off-by: Toshiaki Aoike <taoike@yahoo-corp.jp>
@@ -3526,8 +3526,19 @@ void validateInstanceServiceIdentity(DomainData domainData, final String service | |||
// need to check anything | |||
|
|||
final String domainName = domainData.getName(); | |||
if (validateServiceSkipDomains.contains(domainName)) { | |||
return; | |||
if (domainName != null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one more comment - looking at the server code, this can never be null so we should remove It, otherwise it's missing unit tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you.
Since it has been determined that domainName will not be null, I have removed the branching.
Additionally, I've made modifications to the test code to specify the domainName.
…ching and modified the test code to specify the domainName. Signed-off-by: Toshiaki Aoike <taoike@yahoo-corp.jp>
description
We have enabled the use of wildcards in the ServiceSkipDomains.
reference
I implemented it based on the reference from #2202.