Examples of KerberosConfigData


Examples of org.wso2.carbon.security.config.service.KerberosConfigData

        try {
            if (!this.registry.resourceExists(kerberosPath)) {
                return null;
            }

            KerberosConfigData kerberosConfigData = new KerberosConfigData();

            String servicePrincipalResource = kerberosPath + "/" + KerberosConfig.SERVICE_PRINCIPLE_NAME;
            kerberosConfigData.setServicePrincipleName(getRegistryProperty(servicePrincipalResource,
                    KerberosConfig.SERVICE_PRINCIPLE_NAME));

            String servicePrincipalPasswordResource = kerberosPath + "/" + KerberosConfig.SERVICE_PRINCIPLE_PASSWORD;
            String encryptedString = getRegistryProperty(servicePrincipalPasswordResource,
                    KerberosConfig.SERVICE_PRINCIPLE_PASSWORD);

            CryptoUtil cryptoUtil = CryptoUtil.getDefaultCryptoUtil();
            try {
                kerberosConfigData.setServicePrinciplePassword
                        (new String(cryptoUtil.base64DecodeAndDecrypt(encryptedString)));
            } catch (CryptoException e) {
                String msg = "Unable to decode and decrypt password string.";
                log.warn(msg, e);
            }
View Full Code Here

Examples of org.wso2.carbon.security.config.service.KerberosConfigData

                    trustedStores[i] = temp;
                }
            }
            data.setTrustedKeyStores(trustedStores);

            KerberosConfigData kerberosData = this.readKerberosConfigurations(service);
            data.setKerberosConfigurations(kerberosData);

            return data;
        } catch (RegistryException e) {
            // TODO Auto-generated catch block
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.