Skip to content

Commit

Permalink
No longer use unknown.org as a default.
Browse files Browse the repository at this point in the history
Instead, use `this-default-was-not-configured.invalid` becuase it is
more explicit.

[#164177717]

Signed-off-by: Andrew Wittrock <awittrock@pivotal.io>
Co-authored-by: Andrew Wittrock <awittrock@pivotal.io>
  • Loading branch information
Jeremy Morony and Birdrock committed Mar 27, 2019
1 parent d02ac01 commit 3a7749a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion docs/UAA-APIs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1381,7 +1381,7 @@ Fields *Available Fields* ::
groupSearchBase String Required search base - defines where in the LDAP tree the UAA will search for user groups, use the value `memberOf` to skip group search, and use the memberOf attributes of the user.
groupSearchFilter String Required Typically "memberOf={0}" group search filter used when searching for a group. {0} denotes the user DN in the search query, or the group DN in case of a nested group search.
mailAttributeName String Required the name of the attribute that contains the user's email address. In most cases this is "mail"
mailSubstitute String Optional If the user records do not contain an email address, the UAA can create one. It could be "{0}@unknown.org" where
mailSubstitute String Optional If the user records do not contain an email address, the UAA can create one. It could be "{0}@this-default-was-not-configured.invalid" where
mailSubstituteOverridesLdap boolean Optional Set to true only if you always wish to override the LDAP supplied user email address
autoAddGroups boolean Required Currently not used
groupSearchSubTree boolean Required Should the sub tree be searched for user groups
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ private String getEmail(ScimUser scimUser) {
List<Email> emails = scimUser.getEmails();
if (emails == null || emails.isEmpty()) {
return scimUser.getUserName().contains("@") ? scimUser.getUserName() : scimUser.getUserName()
+ "@unknown.org";
+ "@this-default-was-not-configured.invalid";
}
for (Email email : emails) {
if (email.isPrimary()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,11 +146,11 @@ protected UaaUser getUser(AuthzAuthenticationRequest req, Map<String, String> in
if (name.split("@").length == 2 && !name.startsWith("@") && !name.endsWith("@")) {
email = name;
} else {
email = name.replaceAll("@", "") + "@unknown.org";
email = name.replaceAll("@", "") + "@this-default-was-not-configured.invalid";
}
}
else {
email = name + "@unknown.org";
email = name + "@this-default-was-not-configured.invalid";
}
}
String givenName = info.get("given_name");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -416,11 +416,11 @@ protected UaaUser getUser(UaaPrincipal principal, MultiValueMap<String,String> u
if (name.split("@").length == 2 && !name.startsWith("@") && !name.endsWith("@")) {
email = name;
} else {
email = name.replaceAll("@", "") + "@unknown.org";
email = name.replaceAll("@", "") + "@this-default-was-not-configured.invalid";
}
}
else {
email = name + "@unknown.org";
email = name + "@this-default-was-not-configured.invalid";
}
}
if (givenName == null) {
Expand Down

0 comments on commit 3a7749a

Please sign in to comment.