Running Fedora without authorization means that the REST API is available to any request coming from the container and lacks any finer-grained security. This is useful when Fedora is running behind another application that connects to Fedora and implements its own security checks. In addition, this configuration is useful for temporary demonstrations and for running software tests that do not require security.
This configuration does not preclude the use of container authentication to secure Fedora. However, container roles are not used for any further authorization within Fedora. All requests are treated as superusers.
The security bypass for REST endpoint is accomplished by supplying an alternate ModeShape authentication provider. This provider permits all actions at the Modeshape level.
Step-by-Step Configuration
- Open your Spring configuration file.
- Remove any beans that are instances of
org.fcrepo.auth.common.ShiroAuthenticationProvider
. - Remove the
depends-on
attribute from themodeshapeRepofactory
bean, if there is one.
- Remove any beans that are instances of
- Open your Modeshape repository configuration file (repository.json).
- Under security, configure the
BypassSecurityServletAuthenticationProvider
, as shown in the example below.
- Under security, configure the
"security" : { "anonymous" : { "roles" : ["readonly","readwrite","admin"], "useOnFailedLogin" : false }, "providers" : [ { "classname" : "org.fcrepo.auth.commons.BypassSecurityServletAuthenticationProvider" } ] },