ari-ban / test2

0 stars 0 forks source link

When no subject is available, the getPasswordCredential method returns null and does not use the GenericJMSRAProperties. #62

Closed arinban closed 6 years ago

arinban commented 6 years ago

SecurityUtils.zip This code change will create password credentials from the GenericJMSRAProperties when no subject is available.

This code needs to be added to the com\sun\genericra\util\SecurityUtils.java method public static PasswordCredential getPasswordCredential

    logger.fine("mcf: " + mcf + ", subject: " + subject + ", info: " + info);
    if (info == null) {
        if (subject == null) {
            if (mcf instanceof GenericJMSRAProperties) {
                GenericJMSRAProperties props = (GenericJMSRAProperties)mcf;
                String userName = props.getUserName();
                String pwd = props.getPassword();
                if (userName != null || pwd != null) {
                    return new PasswordCredential(userName, pwd == null ? new char[0] : pwd.toCharArray());
                }
            }
arinban commented 6 years ago
arinban commented 6 years ago

@arinban Commented

arinban commented 6 years ago

@arinban Commented @arinban Commented

arinban commented 6 years ago

Closing this as this issue is migrated to https://github.com/ari-ban/test1/issues/62