Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Trying to get security working... still failing

  • Loading branch information...
commit 9fc5aeecd5718ed80fcb54f36f2a6f95733b4a65 1 parent b0f13c7
@jdillon jdillon authored
View
11 nexus-webapp/src/main/java/org/sonatype/nexus/webapp/MetricsModule.java
@@ -24,7 +24,7 @@
/**
* <a href="http://metrics.codahale.com">Yammer Metrics</a> guice configuration.
*
- * Installs metrics endpoints:
+ * Installs servlet endpoints:
*
* <ul>
* <li>/internal/ping</li>
@@ -33,7 +33,7 @@
* <li>/internal/healthcheck</li>
* </ul>
*
- * Protected by {@code metrics-endpoints} permission.
+ * Protected by {@code nexus:metrics-endpoints} permission.
*
* @since 2.5
*/
@@ -94,14 +94,13 @@ protected void configureServlets() {
}
});
+ // require permission to use endpoints
install(new FilterChainModule()
{
@Override
protected void configure() {
- addFilterChain(MOUNT_POINT + "/**", "noSessionCreation,authcBasic");
-
- // FIXME: This does not work, unsure why...
- //addFilterChain(MOUNT_POINT + "/**", "noSessionCreation,authcBasic,perms[metrics-endpoints]");
+ // FIXME: This is working slighlty better now, but still not working properly :-(
+ addFilterChain(MOUNT_POINT + "/**", "noSessionCreation,authcBasic,perms[nexus:metrics-endpoints]");
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.