Skip to content

Commit

Permalink
Add some notes regarding internal data structures
Browse files Browse the repository at this point in the history
  • Loading branch information
thurloat committed Jan 9, 2015
1 parent df387cd commit c6406db
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,24 @@ Test accessing your container using your new keys using `curl`
< HTTP/1.1 401 Unauthorized
<
401 Unauthorized: Auth Key invalid

# Internal Structure

We store key data in Container Metadata, and it can contain any number of full and read keys to match.

```
Full-Key
Full-Key-1
Full-Key-2
Read-Key
Read-Key-1
```

which translates to the following structure on read:

```
{FULL: ['x', 'x1'],
READ: ['y', 'y1']}
```

and validity is checked through an IN comparator. This allows for multiple read and full keys to exist on the container, and be checked by the middleware. The logic for deprecating and moving API key values is not part of the authentication middleware, and is to be implemented at the dashboard / application level.

0 comments on commit c6406db

Please sign in to comment.