[ 
https://issues.apache.org/jira/browse/NIFI-4382?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16181294#comment-16181294
 ] 

ASF GitHub Bot commented on NIFI-4382:
--------------------------------------

Github user alopresto commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2177#discussion_r141146376
  
    --- Diff: 
nifi-commons/nifi-properties/src/main/java/org/apache/nifi/util/NiFiProperties.java
 ---
    @@ -886,18 +893,70 @@ public String getOidcPreferredJwsAlgorithm() {
         }
     
         /**
    +     * Returns whether Knox SSO is enabled.
    +     *
    +     * @return whether Knox SSO is enabled
    +     */
    +    public boolean isKnoxSsoEnabled() {
    +        return !StringUtils.isBlank(getKnoxUrl());
    +    }
    +
    +    /**
    +     * Returns the Knox URL.
    +     *
    +     * @return Knox URL
    +     */
    +    public String getKnoxUrl() {
    +        return getProperty(SECURITY_USER_KNOX_URL);
    +    }
    +
    +    /**
    +     * Gets the configured Knox Audiences.
    +     *
    +     * @return Knox audiences
    +     */
    +    public Set<String> getKnoxAudiences() {
    +        final String rawAudiences = 
getProperty(SECURITY_USER_KNOX_AUDIENCES);
    +        if (StringUtils.isBlank(rawAudiences)) {
    +            return null;
    +        } else {
    +            final String[] audienceTokens = rawAudiences.split(",");
    +            return Stream.of(audienceTokens).map(String::trim).filter(aud 
-> !StringUtils.isEmpty(aud)).collect(Collectors.toSet());
    +        }
    +    }
    +
    +    /**
    +     * Returns the path to the Knox public key.
    +     *
    +     * @return path to the Knox public key
    +     */
    +    public Path getKnoxPublicKey() {
    --- End diff --
    
    Could this property name include the word `Path` so it's clear that the 
return value is not the key content (if the consumer doesn't read the API docs)?


> Add KnoxSSO support to NiFi
> ---------------------------
>
>                 Key: NIFI-4382
>                 URL: https://issues.apache.org/jira/browse/NIFI-4382
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>            Reporter: Jeff Storck
>            Assignee: Jeff Storck
>
> Add support for KnoxSSO to NiFi.
> Reference documentation: 
> http://knox.apache.org/books/knox-0-13-0/dev-guide.html#KnoxSSO+Integration



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to