Package org.apache.sentry.provider.common

Examples of org.apache.sentry.provider.common.ProviderBackendContext


  public void setup() throws IOException {
    baseDir = Files.createTempDir();
    PolicyFiles.copyToDir(baseDir, resourcePath);
    backend = new SimpleFileProviderBackend(new Configuration(), new File(baseDir, resourcePath)
      .toString());
    context = new ProviderBackendContext();
  }
View Full Code Here


  private final ProviderBackend providerBackend;

  public SimpleSearchPolicyEngine(ProviderBackend providerBackend) {
    this.providerBackend = providerBackend;
    ProviderBackendContext context = new ProviderBackendContext();
    context.setAllowPerDatabase(false);
    context.setValidators(createPrivilegeValidators());
    this.providerBackend.initialize(context);
  }
View Full Code Here

  private final ProviderBackend providerBackend;

  public SimpleDBPolicyEngine(String serverName, ProviderBackend providerBackend) {
    this.providerBackend = providerBackend;
    ProviderBackendContext context = new ProviderBackendContext();
    context.setAllowPerDatabase(true);
    context.setValidators(createPrivilegeValidators(serverName));
    this.providerBackend.initialize(context);
  }
View Full Code Here

  private PrivilegeCacheTestImpl testCache;

  @Before
  public void setup() throws IOException {
    backend = new SimpleCacheProviderBackend(new Configuration(), "");
    context = new ProviderBackendContext();
    testCache = new PrivilegeCacheTestImpl();
    context.setBindingHandle(testCache);
  }
View Full Code Here

  public PrivilegeCacheTestImpl() throws FileNotFoundException, IOException {
    baseDir = Files.createTempDir();
    PolicyFiles.copyToDir(baseDir, resourcePath);
    backend = new SimpleFileProviderBackend(new Configuration(), new File(baseDir, resourcePath)
      .toString());
    backend.initialize(new ProviderBackendContext());
  }
View Full Code Here

    SimpleFileProviderBackend policyFileBackend;
    SentryPolicyServiceClient client;

    policyFileBackend = new SimpleFileProviderBackend(getAuthzConf(),
        getAuthzConf().get(AuthzConfVars.AUTHZ_PROVIDER_RESOURCE.getVar()));
    ProviderBackendContext context = new ProviderBackendContext();
    context.setAllowPerDatabase(true);
    policyFileBackend.initialize(context);
    client = new SentryPolicyServiceClient(getAuthzConf());
    Set<String> roles = new HashSet<String>();
    for (TSentryRole sentryRole : client.listRoles(requestorUserName)) {
      roles.add(sentryRole.getRoleName());
View Full Code Here

TOP

Related Classes of org.apache.sentry.provider.common.ProviderBackendContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.