Examples of SecurityRealm


Examples of org.apache.geronimo.security.realm.SecurityRealm

        return doc;
    }

    private void actionLoadExistingRealm(PortletRequest request, RealmData data) {
        SecurityRealm realm = (SecurityRealm) PortletManager.getManagedBean(request, new AbstractName(URI.create(data.getAbstractName())));
        data.name = realm.getRealmName();
        data.global = ((ConfigurationEntryFactory)realm).isGlobal();
        List list = new ArrayList();
        JaasLoginModuleChain node = realm.getLoginModuleChain();
        while (node != null) {
            LoginModuleDetails details = new LoginModuleDetails();
            details.setControlFlag(node.getControlFlag());
            LoginModuleSettings module = node.getLoginModule();
            details.setLoginDomainName(module.getLoginDomainName());
View Full Code Here

Examples of org.apache.geronimo.security.realm.SecurityRealm

            } catch (IOException e) {
                log.error("Unable to save security realm", e);
                return "Unable to save security realm: " + e.getMessage();
            }
        } else {
            SecurityRealm realm = (SecurityRealm) PortletManager.getManagedBean(request, new AbstractName(URI.create(data.getAbstractName())));
            // index existing modules
            Map nodes = new HashMap();
            JaasLoginModuleChain node = realm.getLoginModuleChain();
            while (node != null) {
                LoginModuleSettings module = node.getLoginModule();
                nodes.put(module.getLoginDomainName(), node);
                node = node.getNext();
                if (node == null) {
View Full Code Here

Examples of org.apache.geronimo.security.realm.SecurityRealm

     *
     * @return The client handle used as an argument for the rest of the
     *         methods in this class.
     */
    public JaasSessionId connectToRealm(String realmName) {
        SecurityRealm realm;
        realm = getRealm(realmName);
        if (realm == null) {
            throw new GeronimoSecurityException("No such realm (" + realmName + ")");
        } else {
            return initializeClient(realm);
View Full Code Here

Examples of org.jboss.as.domain.management.SecurityRealm

            // Gather the required information to connect to the remote DC
            final ProtocolChannelClient.Configuration configuration = new ProtocolChannelClient.Configuration();
            configuration.setUri(new URI("remote://" + NetworkUtils.formatPossibleIpv6Address(localHostInfo.getRemoteDomainControllerHost()) + ":" + localHostInfo.getRemoteDomainControllertPort()));
            configuration.setEndpoint(endpointInjector.getValue());

            final SecurityRealm realm = securityRealmInjector.getOptionalValue();
            // Create the remote domain channel strategy
            connection = new RemoteDomainConnection(localHostInfo.getLocalHostName(), hostInfo, configuration, realm,
                                                    executor, new RemoteDomainConnection.HostRegistrationCallback() {
                @Override
                public boolean applyDomainModel(final List<ModelNode> bootOperations) {
View Full Code Here

Examples of org.jboss.as.domain.management.SecurityRealm

            final ServiceName securityRealmServiceName = SecurityRealmService.BASE_SERVICE_NAME.append(this.securityRealmName);
            final ServiceController<SecurityRealm> securityRealmController = (ServiceController<SecurityRealm>) this.serviceRegistry.getService(securityRealmServiceName);
            if (securityRealmController == null) {
                return new AnonymousCallbackHandler();
            }
            final SecurityRealm securityRealm = securityRealmController.getValue();
            final CallbackHandlerFactory cbhFactory;
            if (securityRealm != null && (cbhFactory = securityRealm.getSecretCallbackHandlerFactory()) != null && this.userName != null) {
                return cbhFactory.getCallbackHandler(this.userName);
            } else {
                return new AnonymousCallbackHandler();
            }
        }
View Full Code Here

Examples of org.jboss.as.domain.management.SecurityRealm

            // Gather the required information to connect to the remote DC
            final ProtocolChannelClient.Configuration configuration = new ProtocolChannelClient.Configuration();
            configuration.setUri(new URI("remote://" + NetworkUtils.formatPossibleIpv6Address(localHostInfo.getRemoteDomainControllerHost()) + ":" + localHostInfo.getRemoteDomainControllerPort()));
            configuration.setEndpoint(endpointInjector.getValue());

            final SecurityRealm realm = securityRealmInjector.getOptionalValue();
            // Create the remote domain channel strategy
            connection = new RemoteDomainConnection(localHostInfo.getLocalHostName(), hostInfo, configuration, realm,
                                                    executor, new RemoteDomainConnection.HostRegistrationCallback() {
                @Override
                public boolean applyDomainModel(final List<ModelNode> bootOperations) {
View Full Code Here

Examples of org.jboss.as.domain.management.SecurityRealm

        final Endpoint endpoint = this.endpointInjectedValue.getValue();

        final CallbackHandler callbackHandler;
        final CallbackHandlerFactory cbhFactory;
        SSLContext sslContext = null;
        SecurityRealm realm = securityRealmInjectedValue.getOptionalValue();
        if (realm != null && (cbhFactory = realm.getSecretCallbackHandlerFactory()) != null && username != null) {
            callbackHandler = cbhFactory.getCallbackHandler(username);
        } else {
            callbackHandler = getCallbackHandler();
        }

        if (realm != null) {
            sslContext = realm.getSSLContext();
        }

        OptionMap.Builder builder = OptionMap.builder();
        builder.addAll(this.connectionCreationOptions);
        builder.set(SASL_POLICY_NOANONYMOUS, Boolean.FALSE);
View Full Code Here

Examples of org.jboss.as.domain.management.SecurityRealm

            final ServiceName securityRealmServiceName = SecurityRealm.ServiceUtil.createServiceName(this.securityRealmName);
            final ServiceController<SecurityRealm> securityRealmController = (ServiceController<SecurityRealm>) this.serviceRegistry.getService(securityRealmServiceName);
            if (securityRealmController == null) {
                return new AnonymousCallbackHandler();
            }
            final SecurityRealm securityRealm = securityRealmController.getValue();
            final CallbackHandlerFactory cbhFactory;
            if (securityRealm != null && (cbhFactory = securityRealm.getSecretCallbackHandlerFactory()) != null && this.userName != null) {
                return cbhFactory.getCallbackHandler(this.userName);
            } else {
                return new AnonymousCallbackHandler();
            }
        }
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.config.realm.SecurityRealm

         *
         */
        @Override
        protected SecurityRealm[] getSecurityRealms() {
            final ServerIdentity serverIdentity = new ServerIdentity.Builder().secretPlain(EJBUtil.CONNECTION_PASSWORD).build();
            final SecurityRealm realm = new SecurityRealm.Builder().name(EJB_OUTBOUND_REALM).serverIdentity(serverIdentity)
                    .build();
            return new SecurityRealm[] { realm };
        }
View Full Code Here

Examples of org.jboss.as.test.integration.security.common.config.realm.SecurityRealm

         *
         */
        @Override
        protected SecurityRealm[] getSecurityRealms() {
            final ServerIdentity serverIdentity = new ServerIdentity.Builder().secretPlain(EJBUtil.CONNECTION_PASSWORD).build();
            final SecurityRealm realm = new SecurityRealm.Builder().name(EJB_OUTBOUND_REALM).serverIdentity(serverIdentity)
                    .build();
            return new SecurityRealm[] { realm };
        }
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.