Skip to content

Commit b2c7d75

Browse files
committed
Address some comment 2
Signed-off-by: Ryan Liang <jiallian@amazon.com>
1 parent d79973c commit b2c7d75

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/org/opensearch/security/action/onbehalf/CreateOnBehalfOfTokenAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public void accept(RestChannel channel) throws Exception {
110110
try {
111111
if (vendor == null) {
112112
channel.sendResponse(
113-
new BytesRestResponse(RestStatus.SERVICE_UNAVAILABLE, "on_behalf_of configuration is not being configured")
113+
new BytesRestResponse(RestStatus.SERVICE_UNAVAILABLE, "on_behalf_of is either disabled or the configuration is invalid")
114114
);
115115
return;
116116
}

src/main/java/org/opensearch/security/http/OnBehalfOfAuthenticator.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,8 +211,8 @@ private AuthCredentials extractCredentials0(final RestRequest request) {
211211
}
212212

213213
final String issuer = claims.getIssuer();
214-
final String clusterID = OpenSearchSecurityPlugin.getClusterName().getClusterName().value();
215-
if (!issuer.equals(clusterID)) {
214+
final String clusterName = OpenSearchSecurityPlugin.getClusterName().getClusterName().value();
215+
if (!issuer.equals(clusterName)) {
216216
log.error("This issuer of this OBO does not match the current cluster identifier");
217217
return null;
218218
}

0 commit comments

Comments
 (0)