-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable stateless HTTP Basic Authentication #62
Comments
I was wondering whether Basil supports a SPARQL endpoint with HTTP Basic Authentication, but I guess this issue is not about the SPARQL endpoint? |
@barrynl , a quick-and-dirty solution to supporting queries to SPARQL endpoint with HTTP Basic Authentication is to modify basil/src/main/java/uk/ac/open/kmi/basil/invoke/DirectExecutor.java so that public InvocationResult execute(Query q, String endpoint) reads as follows:
Make sure that you substitute USERNAME and PASSWORD with appropriate values, and of course a rebuild is needed. The solution is clearly suboptimal since it assumes that all endpoints queried by the same installation share the same username and password. The best way to implement it would cater for providing the authentication method within the query specification (even different queries to the same endpoint might need different credentials) and then the execute method would examine whether authentication is needed and accordingly set the http client needed. |
I know this is a very late reaction. The above comments, very relevant in general, are not related to this issue specifically as here we refer to the way basil handles authentication for managing api creation etc... This specific issue has been fixed. |
Created #69 to track the issue discussed by @barrynl and @costasvassilakis |
With the implementation of the shiro session based authorization Basil supports users and roles so that only the API creator can modify or delete an entry.
However, the current implementation is based on sessions, that are unhandy to be managed from the curl command line. When the Shiro Subject is not authenticated, we should forcely check whether the request also contains an HTTP Basic Header and authenticate the Subject forcely, without opening a session this time.
The text was updated successfully, but these errors were encountered: