Package org.nimbustools.ctxbroker.security

Examples of org.nimbustools.ctxbroker.security.BootstrapInformation


    public String getContextSecret(EndpointReferenceType ref)
            throws ContextBrokerException {
        final ResourceKey ctxKey = this.getResourceKey(ref);
        final ContextBrokerResource resource =
                                        this.findResourceNoSecurity(ctxKey);
        BootstrapInformation bootstrap = resource.getBootstrap();

        // current secret string is a separated list:
        /*
           Separator
           Position 0: Public certificate (pem) to contact ctx service
           Separator
           Position 1: Private key (pem) to contact ctx service
           Separator
        */

        StringBuffer buf = new StringBuffer();
        buf.append(ContextBrokerHome.FIELD_SEPARATOR)
           .append(bootstrap.getPublicX509String())
           .append(ContextBrokerHome.FIELD_SEPARATOR)
           .append(bootstrap.getPrivateString())
           .append(ContextBrokerHome.FIELD_SEPARATOR);
        return buf.toString();
    }
View Full Code Here


        //       presumbaly the VMs (for now) would contact with same cred
        //       so expiration will affect things in that situation
        final Calendar expires = Calendar.getInstance();
    expires.add(Calendar.MONTH, 1);
       
        final BootstrapInformation bootstrap =
                this.bootstrapFactory.newBootstrap(uuid,
                                                   this.serviceAddress,
                                                   expires);

        resource.setBootstrap(bootstrap);

        // in the future, policy should come from elsewhere
        try {
            resource.initSecureResource(callerDN, bootstrap.getBootstrapDN());
        } catch (ConfigException e) {
            throw new ContextBrokerException("", e);
        }

        logger.info("WS-CTX created new contextualization " +
View Full Code Here

TOP

Related Classes of org.nimbustools.ctxbroker.security.BootstrapInformation

Copyright © 2018 www.massapicom. 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.