Skip to content

Commit

Permalink
feat(gms): Pluggable Authentication & Authorization Framework (#6634)
Browse files Browse the repository at this point in the history
  • Loading branch information
siddiquebagwan authored Dec 6, 2022
1 parent b4d966b commit f2a83f3
Show file tree
Hide file tree
Showing 150 changed files with 3,057 additions and 1,869 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,5 @@ temp/**
datahub-frontend/public/**

.remote*
# Ignore runtime generated authenticatior/authorizer jar files
metadata-service/plugin/src/test/resources/sample-plugins/**
4 changes: 3 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ project.ext.externalDependency = [
'httpClient': 'org.apache.httpcomponents:httpclient:4.5.9',
'httpAsyncClient': 'org.apache.httpcomponents:httpasyncclient:4.1.5',
'iStackCommons': 'com.sun.istack:istack-commons-runtime:4.0.1',
'jacksonJDK8': "com.fasterxml.jackson.datatype:jackson-datatype-jdk8:$jacksonVersion",
'jacksonDataPropertyFormat': "com.fasterxml.jackson.dataformat:jackson-dataformat-properties:$jacksonVersion",
'jacksonCore': "com.fasterxml.jackson.core:jackson-core:$jacksonVersion",
'jacksonDataBind': "com.fasterxml.jackson.core:jackson-databind:$jacksonVersion.2",
'jacksonDataFormatYaml': "com.fasterxml.jackson.dataformat:jackson-dataformat-yaml:$jacksonVersion",
Expand Down Expand Up @@ -195,7 +197,7 @@ allprojects {
apply plugin: 'checkstyle'
}

configure(subprojects.findAll {! it.name.startsWith('spark-lineage') }) {
configure(subprojects.findAll {! it.name.startsWith('spark-lineage')}) {

configurations.all {
exclude group: "io.netty", module: "netty"
Expand Down
1 change: 1 addition & 0 deletions datahub-graphql-core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ apply plugin: 'java'
dependencies {
compile project(':metadata-service:restli-client')
compile project(':metadata-service:auth-impl')
compile project(':metadata-service:auth-api')
compile project(':metadata-io')
compile project(':metadata-utils')

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
import com.datahub.authentication.AuthenticationConfiguration;
import com.datahub.authentication.group.GroupService;
import com.datahub.authentication.invite.InviteTokenService;
import com.datahub.authentication.post.PostService;
import com.datahub.authentication.token.StatefulTokenService;
import com.datahub.authentication.user.NativeUserService;
import com.datahub.authorization.AuthorizationConfiguration;
import com.datahub.authorization.role.RoleService;
import com.datahub.authentication.post.PostService;
import com.google.common.collect.ImmutableList;
import com.linkedin.common.VersionedUrn;
import com.linkedin.common.urn.Urn;
Expand Down Expand Up @@ -249,7 +249,7 @@
import com.linkedin.datahub.graphql.types.tag.TagType;
import com.linkedin.datahub.graphql.types.test.TestType;
import com.linkedin.entity.client.EntityClient;
import com.linkedin.metadata.config.DatahubConfiguration;
import com.linkedin.metadata.config.DataHubConfiguration;
import com.linkedin.metadata.config.IngestionConfiguration;
import com.linkedin.metadata.config.TestsConfiguration;
import com.linkedin.metadata.config.VisualConfiguration;
Expand Down Expand Up @@ -327,7 +327,7 @@ public class GmsGraphQLEngine {
private final VisualConfiguration visualConfiguration;
private final TelemetryConfiguration telemetryConfiguration;
private final TestsConfiguration testsConfiguration;
private final DatahubConfiguration datahubConfiguration;
private final DataHubConfiguration datahubConfiguration;

private final DatasetType datasetType;
private final CorpUserType corpUserType;
Expand Down Expand Up @@ -393,7 +393,7 @@ public GmsGraphQLEngine(final EntityClient entityClient, final GraphClient graph
final AuthorizationConfiguration authorizationConfiguration, final GitVersion gitVersion,
final TimelineService timelineService, final boolean supportsImpactAnalysis,
final VisualConfiguration visualConfiguration, final TelemetryConfiguration telemetryConfiguration,
final TestsConfiguration testsConfiguration, final DatahubConfiguration datahubConfiguration,
final TestsConfiguration testsConfiguration, final DataHubConfiguration datahubConfiguration,
final SiblingGraphService siblingGraphService, final GroupService groupService, final RoleService roleService,
final InviteTokenService inviteTokenService, final PostService postService, final FeatureFlags featureFlags) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authentication.Actor;
import com.datahub.authentication.Authentication;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;


/**
Expand All @@ -16,7 +16,7 @@ public interface QueryContext {
boolean isAuthenticated();

/**
* Returns the {@link com.datahub.authentication.Authentication} associated with the current query context.
* Returns the {@link Authentication} associated with the current query context.
*/
Authentication getAuthentication();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authorization.AuthorizationRequest;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.datahub.authorization.ResourceSpec;
import com.google.common.collect.ImmutableList;
import com.linkedin.common.AuditStamp;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import java.util.Optional;
import com.datahub.authorization.AuthorizationRequest;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;

public class AuthUtils {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authorization.AuthorizationRequest;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.linkedin.common.urn.Urn;
import com.linkedin.datahub.graphql.QueryContext;
import com.linkedin.datahub.graphql.authorization.AuthorizationUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import com.linkedin.datahub.graphql.generated.TelemetryConfig;
import com.linkedin.datahub.graphql.generated.TestsConfig;
import com.linkedin.datahub.graphql.generated.VisualConfig;
import com.linkedin.metadata.config.DatahubConfiguration;
import com.linkedin.metadata.config.DataHubConfiguration;
import com.linkedin.metadata.config.IngestionConfiguration;
import com.linkedin.metadata.config.TestsConfiguration;
import com.linkedin.metadata.telemetry.TelemetryConfiguration;
Expand All @@ -42,7 +42,7 @@ public class AppConfigResolver implements DataFetcher<CompletableFuture<AppConfi
private final VisualConfiguration _visualConfiguration;
private final TelemetryConfiguration _telemetryConfiguration;
private final TestsConfiguration _testsConfiguration;
private final DatahubConfiguration _datahubConfiguration;
private final DataHubConfiguration _datahubConfiguration;

public AppConfigResolver(
final GitVersion gitVersion,
Expand All @@ -54,7 +54,7 @@ public AppConfigResolver(
final VisualConfiguration visualConfiguration,
final TelemetryConfiguration telemetryConfiguration,
final TestsConfiguration testsConfiguration,
final DatahubConfiguration datahubConfiguration) {
final DataHubConfiguration datahubConfiguration) {
_gitVersion = gitVersion;
_isAnalyticsEnabled = isAnalyticsEnabled;
_ingestionConfiguration = ingestionConfiguration;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.linkedin.datahub.graphql.resolvers.ingest;

import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.google.common.collect.ImmutableList;
import com.linkedin.datahub.graphql.QueryContext;
import com.linkedin.metadata.authorization.PoliciesConfig;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.linkedin.datahub.graphql.resolvers.policy;

import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.google.common.collect.ImmutableList;
import com.linkedin.datahub.graphql.QueryContext;
import com.linkedin.metadata.authorization.PoliciesConfig;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authentication.Authentication;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.linkedin.common.AuditStamp;
import com.linkedin.metadata.entity.EntityService;
import com.linkedin.mxe.MetadataChangeProposal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authorization.AuthorizationRequest;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.datahub.authorization.ResourceSpec;
import com.linkedin.common.urn.Urn;
import com.linkedin.common.urn.UrnUtils;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authentication.Authentication;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.google.common.collect.ImmutableMap;
import com.linkedin.common.urn.Urn;
import com.linkedin.data.template.StringMap;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

import com.datahub.authorization.AuthorizationRequest;
import com.datahub.authorization.AuthorizationResult;
import com.datahub.authorization.Authorizer;
import com.datahub.plugins.auth.authorization.Authorizer;
import com.linkedin.datahub.graphql.QueryContext;
import java.util.Optional;
import org.mockito.Mockito;
Expand Down
110 changes: 0 additions & 110 deletions datahub-ranger-plugin/build.gradle

This file was deleted.

This file was deleted.

Loading

0 comments on commit f2a83f3

Please sign in to comment.