Package org.uberfire.security.authz

Examples of org.uberfire.security.authz.AuthorizationManager


        final String forceURL = getForceURL( options );
        final AuthenticationScheme authScheme = getAuthenticationScheme( options );
        final AuthenticationManager authManager = getAuthenticationManager( options );
        final AuthenticationProvider authProvider = getAuthenticationProvider( options );
        final ResourceManager resourceManager = getResourceManager( options );
        final AuthorizationManager authzManager = getAuthorizationManager( options );
        final VotingStrategy urlVotingStrategy = getURLVotingStrategy( options );
        final ResourceDecisionManager accessDecisionManager = getURLAccessDecisionManager( options );
        final RoleDecisionManager roleDecisionManager = getRoleDecisionManager( options );
        final RoleProvider roleProvider = getRoleProvider( options );
        final SubjectPropertiesProvider propertiesProvider = getPropertiesProvider( options );
View Full Code Here


    private Instance<AuthorizationManager> authorizationManagers;

    @PostConstruct
    public void setup() {
        AuthenticationManager _authenticationManager = null;
        AuthorizationManager _authorizationManager = null;

        if ( authenticationManagers.isUnsatisfied() ) {
            final String authType = System.getProperty( "org.uberfire.io.auth", null );
            final String domain = System.getProperty( SecurityConstants.AUTH_DOMAIN_KEY, null );
            final String _mode = System.getProperty( ROLE_MODE_KEY, RolesMode.GROUP.toString() );
            RolesMode mode;
            try {
                mode = RolesMode.valueOf( _mode );
            } catch ( final Exception ignore ) {
                mode = RolesMode.GROUP;
            }

            if ( authType == null || authType.toLowerCase().equals( "jaas" ) || authType.toLowerCase().equals( "container" ) ) {
                _authenticationManager = new JAASAuthenticationManager( domain, mode );
            } else if ( authType.toLowerCase().equals( "property" ) ) {
                _authenticationManager = new PropertyAuthenticationManager( null );
            } else {
                _authenticationManager = loadClazz( authType, AuthenticationManager.class );
            }
        }

        if ( authorizationManagers.isUnsatisfied() ) {
            _authorizationManager = new FileSystemAuthorizationManager();
        }

        final AuthorizationManager authorizationManager = _authorizationManager;
        final AuthenticationManager authenticationManager = _authenticationManager;

        final org.uberfire.java.nio.security.AuthorizationManager ioAuthorizationManager = new org.uberfire.java.nio.security.AuthorizationManager() {
            @Override
            public boolean authorize( final FileSystem fs,
                                      final Subject subject ) {
                return authorizationManager.authorize( new FileSystemResourceAdaptor( fs ), ( (SubjectWrapper) subject ).getRealSubject() );
            }
        };

        for ( final FileSystemProvider fileSystemProvider : FileSystemProviders.installedProviders() ) {
            if ( fileSystemProvider instanceof SecurityAware ) {
View Full Code Here

TOP

Related Classes of org.uberfire.security.authz.AuthorizationManager

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.