File tree Expand file tree Collapse file tree 2 files changed +9
-10
lines changed
src/main/java/tech/stackable/hadoop Expand file tree Collapse file tree 2 files changed +9
-10
lines changed Original file line number Diff line number Diff line change 3737
3838 <cleanthat .version>2.17</cleanthat .version>
3939 <error-prone .version>2.24.1</error-prone .version>
40+ <google-java-format .version>1.19.2</google-java-format .version>
4041
4142 <maven-clean-plugin .version>3.3.2</maven-clean-plugin .version>
4243 <maven-compiler-plugin .version>3.12.1</maven-compiler-plugin .version>
Original file line number Diff line number Diff line change 2121
2222public class StackableGroupMapper implements GroupMappingServiceProvider {
2323
24- private static final Logger LOG = LoggerFactory .getLogger (StackableGroupMapper .class );
25-
2624 public static final String OPA_MAPPING_URL_PROP = "hadoop.security.group.mapping.opa.policy.url" ;
27- // response base field: see https://www.openpolicyagent.org/docs/latest/rest-api/#response-message
28- private static final String OPA_RESULT_FIELD = "result" ;
29-
25+ private static final Logger LOG = LoggerFactory .getLogger (StackableGroupMapper .class );
3026 private final HttpClient httpClient = HttpClient .newHttpClient ();
3127 private final ObjectMapper json ;
3228 private URI opaUri ;
@@ -59,12 +55,10 @@ public StackableGroupMapper() {
5955 .setSerializationInclusion (JsonInclude .Include .NON_NULL );
6056 }
6157
62- private static class OpaQueryResult {
63- public List <String > result ;
64- }
65-
6658 /**
67- * Returns list of groups for a user.
59+ * Returns list of groups for a user. Internally Hadoop will pass the short name to this function,
60+ * but this prevents us from effectively separating users with the same names but with different
61+ * kerberos principals.
6862 *
6963 * @param user get groups for this user
7064 * @return list of groups for a given user
@@ -139,4 +133,8 @@ public void cacheGroupsAdd(List<String> groups) {
139133 "ignoring cacheGroupsAdd for groups [{}]: caching should be provided by the policy provider" ,
140134 groups );
141135 }
136+
137+ private static class OpaQueryResult {
138+ public List <String > result ;
139+ }
142140}
You can’t perform that action at this time.
0 commit comments