Examples of PathProtectionDescriptor


Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return null;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/external_role_map/*/*", "authcBasic,perms[security:roles]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return null;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor(getResourceUri(), "authcBasic,perms[security:privilegetypes]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return "/users_setpw";
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor(getResourceUri(), "authcBasic,perms[security:userssetpw]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return RESOURCE_URI;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/users_reset/*", "authcBasic,perms[security:usersreset]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return RESOURCE_URI;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor(getResourceUri(), "authcBasic,perms[nexus:configuration]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return "/configs/{" + CONFIG_NAME_KEY + "}";
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/configs/*", "authcBasic,perms[nexus:configuration]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return null;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/user_search/*/*", "authcBasic,perms[security:users]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

  private final AntPathMatcher shiroAntPathMatcher = new AntPathMatcher();

  @Override
  protected void handlePlexusResourceSecurity(PlexusResource resource) {
    PathProtectionDescriptor descriptor = resource.getResourceProtection();
    if (descriptor == null) {
      return;
    }

    // sanity check: path protection descriptor path and resource URI must align
    if (!shiroAntPathMatcher.match(descriptor.getPathPattern(), resource.getResourceUri())) {
      throw new IllegalStateException(String.format(
          "Plexus resource %s would attach to URI=%s but protect path=%s that does not matches URI!",
          resource.getClass().getName(), resource.getResourceUri(),
          descriptor.getPathPattern()));
    }

    String filterExpression = descriptor.getFilterExpression();
    if (filterExpression != null && !filterExpression.contains("authcNxBasic")) {
      // don't create session unless the user logs in from the UI
      filterExpression = "noSessionCreation," + filterExpression;
    }

    this.protectedPathManager.addProtectedResource("/service/local" + descriptor.getPathPattern(), filterExpression);
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return null;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor("/assigned_privileges/*", "authcBasic,perms[security:users]");
  }
View Full Code Here

Examples of org.sonatype.plexus.rest.resource.PathProtectionDescriptor

    return RESOURCE_URI;
  }

  @Override
  public PathProtectionDescriptor getResourceProtection() {
    return new PathProtectionDescriptor(getResourceUri(), "authcBasic,perms[security:users]");
  }
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.