Skip to content

Commit a4d67e6

Browse files
committed
Adding this obo config to xcontent builder and remove unused imports
Signed-off-by: Ryan Liang <jiallian@amazon.com>
1 parent 4b413be commit a4d67e6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/integrationTest/java/org/opensearch/test/framework/TestSecurityConfig.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,10 @@ public XContentBuilder toXContent(XContentBuilder xContentBuilder, Params params
221221
xContentBuilder.startObject();
222222
xContentBuilder.startObject("dynamic");
223223

224+
if (onBehalfOfConfig != null) {
225+
xContentBuilder.field("on_behalf_of", onBehalfOfConfig);
226+
}
227+
224228
if (anonymousAuth || (xffConfig != null)) {
225229
xContentBuilder.startObject("http");
226230
xContentBuilder.field("anonymous_auth_enabled", anonymousAuth);

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@
3232
import org.apache.hc.core5.http.HttpHeaders;
3333
import org.apache.logging.log4j.LogManager;
3434
import org.apache.logging.log4j.Logger;
35-
import org.greenrobot.eventbus.Subscribe;
3635

3736
import org.opensearch.OpenSearchSecurityException;
3837
import org.opensearch.SpecialPermission;
@@ -42,7 +41,6 @@
4241
import org.opensearch.rest.RestRequest;
4342
import org.opensearch.security.auth.HTTPAuthenticator;
4443
import org.opensearch.security.authtoken.jwt.EncryptionDecryptionUtil;
45-
import org.opensearch.security.securityconf.DynamicConfigModel;
4644
import org.opensearch.security.user.AuthCredentials;
4745

4846
public class HTTPOnBehalfOfJwtAuthenticator implements HTTPAuthenticator {

0 commit comments

Comments
 (0)