Skip to content

Commit

Permalink
[Feature/Extension] Remove hostmapping from create OBO endpoint. (#3161)
Browse files Browse the repository at this point in the history
Signed-off-by: Ryan Liang <[email protected]>
  • Loading branch information
RyanL1997 authored Aug 14, 2023
1 parent ade34b4 commit e42e4d3
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,7 @@ public void accept(RestChannel channel) throws Exception {

final String service = (String) requestBody.getOrDefault("service", "self-issued");
final User user = threadPool.getThreadContext().getTransient(ConfigConstants.OPENDISTRO_SECURITY_USER);
final TransportAddress caller = threadPool.getThreadContext()
.getTransient(ConfigConstants.OPENDISTRO_SECURITY_REMOTE_ADDRESS);
Set<String> mappedRoles = mapRoles(user, caller);
Set<String> mappedRoles = mapRoles(user, null);

builder.startObject();
builder.field("user", user.getName());
Expand Down

0 comments on commit e42e4d3

Please sign in to comment.