Skip to content

Commit

Permalink
Merge pull request #281 from mattheimer/feature/JENKINS-65806
Browse files Browse the repository at this point in the history
[JENKINS-65806] Correct handling of `orclIsEnabled` for Oracle Internet Directory
  • Loading branch information
jtnord authored Apr 23, 2024
2 parents 484809f + 5eb2e3c commit 3cbb711
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ to indicate such. The following attributes are all supported:

* `pwdAccountLockedTime` value of `000001010000Z`: common LDAP attribute using password policy overlay;
* `msDS-UserAccountDisabled` value of `TRUE`: modern [Active Directory attribute](https://docs.microsoft.com/en-us/windows/win32/adschema/a-msds-useraccountdisabled);
* `userAccountControl` (UAC) or `msDS-User-Account-Control-Computed` with bit flag of `ADS_UF_ACCOUNTDISABLE` (0x2) present; and
* `loginDisabled` value of `TRUE`: eDirectory attribute.
* `userAccountControl` (UAC) or `msDS-User-Account-Control-Computed` with bit flag of `ADS_UF_ACCOUNTDISABLE` (0x2) present;
* `loginDisabled` value of `TRUE`: eDirectory attribute; and
* `orclIsEnabled` value of `DISABLED`: [Oracle Internet Directory attribute](https://docs.oracle.com/en/middleware/idm/internet-directory/12.2.1.4/administer/managing-accounts-and-passwords-oracle-internet-directory.html#GUID-2E7FAE4E-9762-4559-8204-776A1BF5E66C).

#### Expired Accounts

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/hudson/security/UserAttributesHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ public static void checkIfUserEnabled(@NonNull String username, @NonNull Attribu
}
// Oracle attributes (they were documented on the wiki at least)
String oracleIsEnabled = getStringAttribute(attributes, ATTR_ORACLE_IS_ENABLED);
if (oracleIsEnabled != null && !oracleIsEnabled.equalsIgnoreCase("enabled")) {
if (oracleIsEnabled != null && oracleIsEnabled.equalsIgnoreCase("DISABLED")) {

Check warning on line 117 in src/main/java/hudson/security/UserAttributesHelper.java

View check run for this annotation

ci.jenkins.io / Code Coverage

Partially covered line

Line 117 is only partially covered, 3 branches are missing
throw new DisabledException(Messages.UserDetails_Disabled(username));
}
}
Expand Down

0 comments on commit 3cbb711

Please sign in to comment.