Tabnine Logo
SecurityUtils.getGroupFromLoginModule
Code IndexAdd Tabnine to your IDE (free)

How to use
getGroupFromLoginModule
method
in
alluxio.util.SecurityUtils

Best Java code snippets using alluxio.util.SecurityUtils.getGroupFromLoginModule (Showing top 6 results out of 315)

origin: Alluxio/alluxio

 private CreateUfsFileOptions(AlluxioConfiguration alluxioConf) {
  mOwner = SecurityUtils.getOwnerFromLoginModule(alluxioConf);
  mGroup = SecurityUtils.getGroupFromLoginModule(alluxioConf);
  mMode = ModeUtils.applyFileUMask(Mode.defaults(), alluxioConf
    .get(PropertyKey.SECURITY_AUTHORIZATION_PERMISSION_UMASK));
  // TODO(chaomin): set permission based on the alluxio file. Not needed for now since the
  // file is always created with default permission.
 }
}
origin: Alluxio/alluxio

 private CompleteUfsFileOptions(AlluxioConfiguration alluxioConf) {
  mOwner = SecurityUtils.getOwnerFromLoginModule(alluxioConf);
  mGroup = SecurityUtils.getGroupFromLoginModule(alluxioConf);
  mMode = ModeUtils.applyFileUMask(Mode.defaults(),
    alluxioConf.get(PropertyKey.SECURITY_AUTHORIZATION_PERMISSION_UMASK));
  // TODO(chaomin): set permission based on the alluxio file. Not needed for now since the
  // file is always created with default permission.
 }
}
origin: Alluxio/alluxio

 /**
  * Tests the {@link SecurityUtils#getGroupFromLoginModule()} method.
  */
 @Test
 public void getGroupFromLoginModuleError() throws Exception {
  // When security is not enabled, user and group are not set
  mConfiguration.set(PropertyKey.SECURITY_AUTHENTICATION_TYPE, AuthType.NOSASL.getAuthName());
  Assert.assertEquals("", SecurityUtils.getGroupFromLoginModule(mConfiguration));

  // When authentication is enabled, user and group are inferred from login module
  mConfiguration.set(PropertyKey.SECURITY_AUTHENTICATION_TYPE, AuthType.SIMPLE.getAuthName());
  mConfiguration.set(PropertyKey.SECURITY_LOGIN_USERNAME, "test_login_user");
  mConfiguration.set(PropertyKey.SECURITY_GROUP_MAPPING_CLASS,
    IdentityUserGroupsMapping.class.getName());
  LoginUserTestUtils.resetLoginUser();
  Assert.assertEquals("test_login_user", SecurityUtils.getGroupFromLoginModule(mConfiguration));
 }
}
origin: Alluxio/alluxio

private OutStreamOptions(AlluxioConfiguration alluxioConf) {
 mBlockSizeBytes = alluxioConf.getBytes(PropertyKey.USER_BLOCK_SIZE_BYTES_DEFAULT);
 mTtl = Constants.NO_TTL;
 mTtlAction = TtlAction.DELETE;
 mLocationPolicy =
   CommonUtils.createNewClassInstance(alluxioConf.<FileWriteLocationPolicy>getClass(
     PropertyKey.USER_FILE_WRITE_LOCATION_POLICY), new Class[] {AlluxioConfiguration.class},
     new Object[] {alluxioConf});
 mWriteTier = alluxioConf.getInt(PropertyKey.USER_FILE_WRITE_TIER_DEFAULT);
 mWriteType = alluxioConf.getEnum(PropertyKey.USER_FILE_WRITE_TYPE_DEFAULT, WriteType.class);
 mOwner = SecurityUtils.getOwnerFromLoginModule(alluxioConf);
 mGroup = SecurityUtils.getGroupFromLoginModule(alluxioConf);
 mMode = ModeUtils.applyFileUMask(Mode.defaults(), alluxioConf
   .get(PropertyKey.SECURITY_AUTHORIZATION_PERMISSION_UMASK));
 mMountId = IdUtils.INVALID_MOUNT_ID;
 mReplicationDurable = alluxioConf.getInt(PropertyKey.USER_FILE_REPLICATION_DURABLE);
 mReplicationMax = alluxioConf.getInt(PropertyKey.USER_FILE_REPLICATION_MAX);
 mReplicationMin = alluxioConf.getInt(PropertyKey.USER_FILE_REPLICATION_MIN);
}
origin: Alluxio/alluxio

mInodeTree.initializeRoot(
  SecurityUtils.getOwnerFromLoginModule(ServerConfiguration.global()),
  SecurityUtils.getGroupFromLoginModule(ServerConfiguration.global()),
  ModeUtils.applyDirectoryUMask(Mode.createFullAccess(),
    ServerConfiguration.get(PropertyKey.SECURITY_AUTHORIZATION_PERMISSION_UMASK)),
origin: org.alluxio/alluxio-core-server-master

try (JournalContext context = createJournalContext()) {
 mInodeTree.initializeRoot(SecurityUtils.getOwnerFromLoginModule(),
   SecurityUtils.getGroupFromLoginModule(),
   Mode.createFullAccess().applyDirectoryUMask(), context);
 context.append(mInodeTree.getRoot().toJournalEntry());
alluxio.utilSecurityUtilsgetGroupFromLoginModule

Popular methods of SecurityUtils

  • isSecurityEnabled
    Checks if security is enabled.
  • getGroupFromGrpcClient
  • getOwnerFromGrpcClient
  • getOwnerFromLoginModule
  • isAuthenticationEnabled
    Checks if authentication is enabled.
  • getGroupFromThriftClient
  • getOwnerFromThriftClient
  • isAuthorizationEnabled
    Checks if authorization is enabled.

Popular in Java

  • Start an intent from android
  • getSystemService (Context)
  • putExtra (Intent)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • ArrayList (java.util)
    ArrayList is an implementation of List, backed by an array. All optional operations including adding
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • Notification (javax.management)
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now