Add attribute to allow anonymous GET requests through Syn #9
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Partially resolves: Islandora/documentation#573
What does this Pull Request do?
Adds another attribute to the
site
elementanonymous="(true|false)"
, to allow you to set some or all sites to allow unauthenticated GET requests.What's new?
This does not clean up the XML validation issues I expressed here, but I figured those could be dealt with later.
This adds in the third parsing of the XML files to generate a map of URL and anonymous check, if a site URL matches the host that is the option used, or if the default is set and no site is specified that is what is used.
Sets credentials as
anonymous
with roles ofanonymous
andislandora
.Not sure if there is a way to avoid authentication once you have required it, like to avoid creating sessions like @jonathangreen was suggesting. That can come later.
How should this be tested?
./gradlew clean build
build/lib/islandora-syn-0.0.1-all.jar
to/var/lib/tomcat8/lib
/var/lib/tomcat8/conf/syn-settings.xml
sites file include ananonymous='true'
option.You should be able to access
http://localhost:8080/fcrepo/rest
without a token, but a POST request will still fail.Interested parties
@jonathangreen @ajs6f @dannylamb