Skip to content

Commit

Permalink
Return unknownIdentity for unknown kerberos principal (finos#2889)
Browse files Browse the repository at this point in the history
  • Loading branch information
siaka-Akash authored Jun 5, 2024
1 parent d5e332d commit 3db1cb5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public Optional<Identity> makeIdentity(Object authenticationSource)
Principal principal = SubjectTools.getPrincipalFromSubject(subject);
if (principal == null)
{
throw new IllegalArgumentException("Subject does not contain a KerberosPrincipal");
return Optional.of(Identity.makeUnknownIdentity());
}
String name = principal != null ? principal.getName().split("@")[0] : null;
return Optional.of(new Identity(name, new LegendKerberosCredential(subject)));
Expand Down

0 comments on commit 3db1cb5

Please sign in to comment.