Examples of AuthorizationService


Examples of com.ibm.sbt.services.client.smartcloud.bss.AuthorizationService

      return subscriptionManagement;
    }
   
    public AuthorizationService getAuthorizationService() {
      if (authorizationService == null) {
        authorizationService = new AuthorizationService(getBasicEndpoint());
      }
      return authorizationService;
    }
View Full Code Here

Examples of org.apache.ldap.server.authz.AuthorizationService

        chain.addFirst( "normalizationService", new NormalizationService() );

        chain.addBefore( NEXT_INTERCEPTOR, "authenticationService", new AuthenticationService() );

        chain.addBefore( NEXT_INTERCEPTOR, "authorizationService", new AuthorizationService() );

        chain.addBefore( NEXT_INTERCEPTOR, "exceptionService", new ExceptionService() );

        chain.addBefore( NEXT_INTERCEPTOR, "schemaService", new SchemaService() );
View Full Code Here

Examples of org.apache.ldap.server.authz.AuthorizationService

        interceptorCfg.setInterceptor( new AuthenticationService() );
        list.add( interceptorCfg );
       
        interceptorCfg = new MutableInterceptorConfiguration();
        interceptorCfg.setName( "authorizationService" );
        interceptorCfg.setInterceptor( new AuthorizationService() );
        list.add( interceptorCfg );

        interceptorCfg = new MutableInterceptorConfiguration();
        interceptorCfg.setName( "oldAuthorizationService" );
        interceptorCfg.setInterceptor( new OldAuthorizationService() );
View Full Code Here

Examples of org.apache.ldap.server.authz.AuthorizationService

            attributes.put( "uniqueMember", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
            attributes.put( "creatorsName", DirectoryPartitionNexus.ADMIN_PRINCIPAL );
            attributes.put( "createTimestamp", DateUtils.getGeneralizedTime() );

            partitionNexus.add( upName, normName, attributes );
            AuthorizationService authzSrvc = ( AuthorizationService ) interceptorChain.get( "authorizationService" );
            authzSrvc.cacheNewGroup( upName, normName, attributes );
        }

        // -------------------------------------------------------------------
        // create system configuration area
        // -------------------------------------------------------------------
View Full Code Here

Examples of org.apache.ldap.server.authz.AuthorizationService

        interceptorCfg.setInterceptor( new AuthenticationService() );
        list.add( interceptorCfg );
       
        interceptorCfg = new MutableInterceptorConfiguration();
        interceptorCfg.setName( "authorizationService" );
        interceptorCfg.setInterceptor( new AuthorizationService() );
        list.add( interceptorCfg );
       
        interceptorCfg = new MutableInterceptorConfiguration();
        interceptorCfg.setName( "exceptionService" );
        interceptorCfg.setInterceptor( new ExceptionService() );
View Full Code Here

Examples of org.apache.oozie.service.AuthorizationService

        String resourceName = getResourceName(request);
        request.setAttribute(AUDIT_OPERATION, resourceName);
        request.setAttribute(AUDIT_PARAM, request.getParameter(modeTag));

        try {
            AuthorizationService auth = Services.get().get(AuthorizationService.class);
            auth.authorizeForAdmin(getUser(request), true);
        }
        catch (AuthorizationException ex) {
            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
        }
View Full Code Here

Examples of org.apache.oozie.service.AuthorizationService

    protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String jobId = getResourceName(request);
        request.setAttribute(AUDIT_PARAM, jobId);
        request.setAttribute(AUDIT_OPERATION, request.getParameter(RestConstants.ACTION_PARAM));
        try {
            AuthorizationService auth = Services.get().get(AuthorizationService.class);
            auth.authorizeForJob(getUser(request), jobId, true);
        }
        catch (AuthorizationException ex) {
            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
        }
View Full Code Here

Examples of org.apache.oozie.service.AuthorizationService

                throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0401, OozieClient.USER_NAME);
            }
            if (!requestUser.equals(UNDEF) && !user.equals(requestUser)) {
                throw new XServletException(HttpServletResponse.SC_BAD_REQUEST, ErrorCode.E0400, requestUser, user);
            }
            AuthorizationService auth = Services.get().get(AuthorizationService.class);

            if (acl == null && auth.useDefaultGroupAsAcl()) {
                acl = auth.getDefaultGroup(user);
                conf.set(OozieClient.GROUP_NAME, acl);
            }
            XLog.Info.get().setParameter(XLogService.GROUP, acl);
            String wfPath = conf.get(OozieClient.APP_PATH);
            String coordPath = conf.get(OozieClient.COORDINATOR_APP_PATH);
            String bundlePath = conf.get(OozieClient.BUNDLE_APP_PATH);

            if (wfPath == null && coordPath == null && bundlePath == null) {
                String libPath = conf.get(XOozieClient.LIBPATH);
                conf.set(OozieClient.APP_PATH, libPath);
                wfPath = libPath;
            }
            ServletUtilities.ValidateAppPath(wfPath, coordPath, bundlePath);

            if (wfPath != null) {
                auth.authorizeForApp(user, acl, wfPath, "workflow.xml", conf);
            }
            else if (coordPath != null){
                auth.authorizeForApp(user, acl, coordPath, "coordinator.xml", conf);
            }
            else if (bundlePath != null){
                auth.authorizeForApp(user, acl, bundlePath, "bundle.xml", conf);
            }
        }
        catch (AuthorizationException ex) {
            XLog.getLog(BaseJobServlet.class).info("AuthorizationException ", ex);
            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
View Full Code Here

Examples of org.apache.oozie.service.AuthorizationService

    public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String jobId = getResourceName(request);
        String show = request.getParameter(RestConstants.JOB_SHOW_PARAM);

        try {
            AuthorizationService auth = Services.get().get(AuthorizationService.class);
            auth.authorizeForJob(getUser(request), jobId, false);
        }
        catch (AuthorizationException ex) {
            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
        }
View Full Code Here

Examples of org.apache.oozie.service.AuthorizationService

    protected void doPut(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String jobId = getResourceName(request);
        request.setAttribute(AUDIT_PARAM, jobId);
        request.setAttribute(AUDIT_OPERATION, request.getParameter(RestConstants.ACTION_PARAM));
        try {
            AuthorizationService auth = Services.get().get(AuthorizationService.class);
            auth.authorizeForJob(getUser(request), jobId, true);
        }
        catch (AuthorizationException ex) {
            throw new XServletException(HttpServletResponse.SC_UNAUTHORIZED, ex);
        }
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.