test_class.declarator: prfSecret = "prf-secret"
test_class.modifier: public static final
test_class.original_string: public static final String prfSecret = "prf-secret";
test_class.type: String
test_class.var_name: prfSecret
test_class.declarator: mySecret = "my-secret"
test_class.modifier: public static final
test_class.original_string: public static final String mySecret = "my-secret";
test_class.type: String
test_class.var_name: mySecret
test_class.declarator: admin = "administrator"
test_class.modifier: public static final
test_class.original_string: public static final String admin = "administrator";
test_class.type: String
test_class.var_name: admin
test_class.declarator: secOfficer = "security_officer"
test_class.modifier: public static final
test_class.original_string: public static final String secOfficer = "security_officer";
test_class.type: String
test_class.var_name: secOfficer
test_class.declarator: expUser = "prf_user"
test_class.modifier: public static final
test_class.original_string: public static final String expUser = "prf_user";
test_class.type: String
test_class.var_name: expUser
test_class.declarator: storeUser = "storage_user"
test_class.modifier: public static final
test_class.original_string: public static final String storeUser = "storage_user";
test_class.type: String
test_class.var_name: storeUser
test_class.file: pross-server/src/test/java/com/ibm/pross/server/configuration/permissions/ClientPermissionLoaderTest.java
test_class.identifier: ClientPermissionLoaderTest
test_case.body: @Test
  	public void testNotFoundSecret() throws IOException, UnauthorizedException, NotFoundException {
  
  		final AccessEnforcement accessEnforcement = ClientPermissionLoader
  				.loadIniFile(new File("config/client/clients.config"));
  
  		Assert.assertNotNull(accessEnforcement);
  
  		try {
  			accessEnforcement.enforceAccess(admin, "no-such-secret", Permissions.GENERATE);
  			Assert.fail("Expected not found exception");
  		} catch (NotFoundException expected) {
  
  		}
  	}
test_case.class_method_signature: ClientPermissionLoaderTest.testNotFoundSecret()
test_case.full_signature: @Test public void testNotFoundSecret()
test_case.identifier: testNotFoundSecret
test_case.invocations: loadIniFile assertNotNull enforceAccess fail
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testNotFoundSecret()
focal_class.file: pross-server/src/main/java/com/ibm/pross/server/configuration/permissions/ClientPermissionLoader.java
focal_class.identifier: ClientPermissionLoader
focal_class.class_method_signature: ClientPermissionLoader.loadIniFile(final File iniFile)
focal_class.full_signature: public static AccessEnforcement loadIniFile(final File iniFile)
focal_class.identifier: loadIniFile
focal_class.modifiers: public static
focal_class.parameters: (final File iniFile)
focal_class.return: AccessEnforcement
focal_class.signature: AccessEnforcement loadIniFile(final File iniFile)
focal_method.body: public static AccessEnforcement loadIniFile(final File iniFile) throws IOException {
  
  		System.out.println("Loading client permissions: " + iniFile.toString());
  
  		// Load ini file
  		final Wini ini = new Wini(iniFile);
  
  		// Create map of usernames to their permissions
  		final ConcurrentMap<String, ClientPermissions> permissionMap = new ConcurrentHashMap<String, ClientPermissions>();
  
  		// Create set of all known secrets
  		final Set<String> knownSecrets = new HashSet<>();
  
  		// Iterate over each section (each section is a secret)
  		final Collection<Profile.Section> secretSections = ini.values();
  		for (Profile.Section secretSection : secretSections) {
  
  			// Update set of known secrets
  			final String secretName = secretSection.getName();
  			knownSecrets.add(secretName);
  
  			// Each value in this section represents a user's permission to this secret
  			for (final Entry<String, String> userPermission : secretSection.entrySet()) {
  				final String username = userPermission.getKey();
  				final String permissions = userPermission.getValue();
  
  				// PRint username and secret
  				//System.out.print(username + "." + secretName + "\t\t = ");
  				
  				// Parse permissions
  				final String[] permissionArray = permissions.split(",");
  				//System.out.println(Arrays.toString(permissionArray));
  
  				// Add permissions from the comma-separated list
  				permissionMap.putIfAbsent(username, new ClientPermissions());
  				final ClientPermissions clientPermissions = permissionMap.get(username);
  				for (final String permissionString : permissionArray) {
  					// Sanitize string and convert to enumeration
  					final Permissions permission = Permissions.valueOf(permissionString.trim().toUpperCase());
  					clientPermissions.addPermission(secretName, permission);
  				}
  			}
  		}
  
  		return new AccessEnforcement(permissionMap, knownSecrets);
  	}
focal_method.class_method_signature: ClientPermissionLoader.loadIniFile(final File iniFile)
focal_method.full_signature: public static AccessEnforcement loadIniFile(final File iniFile)
focal_method.identifier: loadIniFile
focal_method.invocations: println toString values getName add entrySet getKey getValue split putIfAbsent get valueOf toUpperCase trim addPermission
focal_method.modifiers: public static
focal_method.parameters: (final File iniFile)
focal_method.return: AccessEnforcement
focal_method.signature: AccessEnforcement loadIniFile(final File iniFile)