Search in sources :

Example 1 with TestSecurityProcessor

use of org.apache.ignite.internal.processors.security.impl.TestSecurityProcessor in project ignite by apache.

the class RestProcessorAuthorizationTest method getPluginProvider.

/**
 * {@inheritDoc}
 */
@Override
protected PluginProvider<?> getPluginProvider(String name) {
    return new TestSecurityPluginProvider(name, null, ALLOW_ALL, globalAuth, clientData()) {

        /**
         * {@inheritDoc}
         */
        @Override
        protected GridSecurityProcessor securityProcessor(GridKernalContext ctx) {
            return new TestSecurityProcessor(ctx, new TestSecurityData(login, pwd, perms, new Permissions()), Arrays.asList(clientData), globalAuth) {

                /**
                 * {@inheritDoc}
                 */
                @Override
                public void authorize(String name, SecurityPermission perm, SecurityContext securityCtx) throws SecurityException {
                    authorizationCtxList.add(F.t(name, perm, securityCtx));
                    super.authorize(name, perm, securityCtx);
                }
            };
        }
    };
}
Also used : TestSecurityData(org.apache.ignite.internal.processors.security.impl.TestSecurityData) TestSecurityProcessor(org.apache.ignite.internal.processors.security.impl.TestSecurityProcessor) TestSecurityPluginProvider(org.apache.ignite.internal.processors.security.impl.TestSecurityPluginProvider) GridKernalContext(org.apache.ignite.internal.GridKernalContext) Permissions(java.security.Permissions) SecurityContext(org.apache.ignite.internal.processors.security.SecurityContext) SecurityPermission(org.apache.ignite.plugin.security.SecurityPermission)

Aggregations

Permissions (java.security.Permissions)1 GridKernalContext (org.apache.ignite.internal.GridKernalContext)1 SecurityContext (org.apache.ignite.internal.processors.security.SecurityContext)1 TestSecurityData (org.apache.ignite.internal.processors.security.impl.TestSecurityData)1 TestSecurityPluginProvider (org.apache.ignite.internal.processors.security.impl.TestSecurityPluginProvider)1 TestSecurityProcessor (org.apache.ignite.internal.processors.security.impl.TestSecurityProcessor)1 SecurityPermission (org.apache.ignite.plugin.security.SecurityPermission)1