Description

Credentials are the username and passwords that should be used for outgoing requests from scripts, queries, or pipelines within a given realm. For example in order to be able to take any action against most servers you need to authenticate yourself. You can do this by hardcoding your username and password into the query string but that is a clunky solution and a potential security risk. That is why Callimachus allows you to store credentials system-wide and whenever one of your scripts, queries, or pipelines is challenged for authentication Callimachus will check your credentials for the proper login information. 

Configuration

Create a Credential

To setup Credentials for your system navigate to the Home Folder and click the "Edit" tab. From here click the icon next to "Credentials" and fill in the form with the appropriate values.

Field Explanation Sample Value
Authority This is the host name of the service. Must be entered in format authority:port or authority if the port is 80. people.example.com
Username The username used to authenticate against the service specified in Authority. username
Password The password tied to the username used to authenticate against the service specified in Authority. password

After filling in the form, click Create and your credentials will be saved. Don't forget to hit "Save" on the Home Folder itself or the relationship will not be created.

Edit a Credential

If you typed the password for a given credential incorrectly you can find it in /auth/credentials. From there click the "Edit" tab and retype the password. If you wish to rename a Credential or change the Authority or Port you will need to delete that Credential and create a new one. 

Remove or Delete a Credential

Removing a Credential means that it no longer applys to your Callimachus instance. The Credential itself stil exists in /auth/credentials and can be reapplied at a later time if you desire. 

Deleting a Credential, on the other hand, removes the Credential entirely from the system along with any relationships to the system it may have. This cannot be undone and if you do so unintentionally you can recreate it via the Create menu. 

Usage

Now that credentials have been stored in your Callimachus instance, you can access that system without explicitly authenticating each and every time. For example, rather than having to write a query like this:


PREFIX foaf:   <http://xmlns.com/foaf/0.1/>

SELECT ?name WHERE {
  ?myself a foaf:Person
    ; ​foaf:knows ?person .
  
  SERVICE <http://username:password@people.example.com/sparql> { 
    ?person foaf:name ?name . 
  } 
}

which exposes in plain text both your username and password, you can write a query like this:


PREFIX foaf:   <http://xmlns.com/foaf/0.1/>

SELECT ?name WHERE {
  ?myself a foaf:Person
    ; ​foaf:knows ?person .
  
  SERVICE <http://people.example.com/sparql> { 
    ?person foaf:name ?name . 
  } 
}

that doesn't include that information. Callimachus takes care of the authentication behind the scenes.