Aurora is a Django web application that can receive, virus check and validate transfers of digital archival records, and allows archivists to appraise and accession those records.
Aurora is part of Project Electron, an initiative to build sustainable, open and user-centered infrastructure for the archival management of digital records at the Rockefeller Archive Center.
$ git clone https://github.com/RockefellerArchiveCenter/aurora.git
$ cd aurora
$ docker-compose up
http://localhost:8000
.If desired, you can import a set of sample bags (not all of which are valid) by running the import_sample_data.sh
script.
Open up a new terminal window and navigate to the root of the application, then run
$ docker-compose exec web import_sample_data
If you'd like to transfer your own bags, note that bags must be serialized as either a TAR (compressed or uncompressed) or ZIP file.
If you'er using S3 storage (see Transferring digital records), you'll need to upload a bag to an S3 bucket configured as an upload bucket for one of your organizations.
If you're using local storage you can then transfer those bags by SFTPing them into the local container using the credentials below:
SFTP
localhost
22
The Docker container is currently configured to persist the MySQL database in local storage. This means that when you shut down the container using docker-compose down
all the data in the application will still be there the next time you run docker-compose up
. If you want to wipe out the database at shut down, simply run docker-compose down -v
.
By default, Aurora is configured to use Amazon Cognito as an OAuth provider for authentication.
If you don't want to use this method of authentication, it is possible to use the built-in local Django authentication layer instead. In order to do this you will need to make a few changes:
MIDDLEWARE
configs in settings.py:
bag_transfer.middleware.cognito.CognitoMiddleware
.bag_transfer.middleware.jwt.AuthenticationMiddlewareJWT
.COGNITO_USE
config value is set to False
.By default, Aurora comes with five user accounts:
Username | Password | User Role |
---|---|---|
admin | password | System Administrator |
donor | password | Read Only User |
appraiser | password | Appraisal Archivist |
accessioner | password | Accessioning Archivist |
manager | password | Managing Archivist |
See the Aurora User Documentation for more information about permissions associated with each user role.
Note that in the Docker container, all user passwords are reset to "password" each time the container is restarted. This behavior can be changed by editing setup_objects.py
, but note that this change will impact your ability to SFTP bags into the container.
At regularly scheduled intervals, Aurora scans the upload targets for each active organization. Any new files or directories in the upload target are added to Aurora's processing queue.
At a high level, transfers are processed as follows:
TRANSFER_FILESIZE_MAX
.bagit-python
.bag-info.txt
file using bagit-profiles-validator
.By default, Aurora is configured to use Amazon S3 to store uploaded and validated transfers.
If you don't want to use S3, you can configure Aurora to use the local file system instead:
S3_USE
config value to False
.TRANSFER_UPLOADS_ROOT
is properly set and that the filepath
specified there exists and is writable by Aurora.sAurora comes with a RESTful API, built using the Django Rest Framework. In addition to interacting with the API via your favorite command-line client, you can also use the browsable API interface available in the application.
In order to make requests against the Aurora API when using an OAuth provider, you will first need to add an application to your OAuth provider, then make a request against the provider's token endpoint using the client credentials flow. The token returned from the provider should then be attached as a Bearer token to requests.
The ElectronBonder
library
contains code which demonstrates this flow (see the authorize_oauth
method in
/electronbonder/client.py
).
If OAuth is disabled (see above), Aurora can use JSON Web Tokens for validation. As with all token-based authentication, you should ensure the application is only available over SSL/TLS in order to avoid token tampering and replay attacks.
To get your token, send a POST request to the /get-token/
endpoint, passing your username and password:
$ curl -X POST -d "username=admin&password=password123" http://localhost:8000/api/get-token/
Your token will be returned in the response. You can then use the token in requests such as:
$ curl -H "Authorization: JWT <your_token>" http://localhost:8000/api/orgs/1/
In a production environment, successfully authenticating against this endpoint may require setting Apache's WSGIPassAuthorization
to On
.
The ElectronBonder
library
contains code which demonstrates this flow (see the authorize
method in
/electronbonder/client.py
).
Aurora comes with the default Django admin site. Only users with superuser privileges are able to view this interface, which can be accessed by clicking on the profile menu and selecting "Administration".
In addition to allowing for the manual creation and deletion of certain objects, this interface also allows authorized users to edit system values which are used by the application, including the human-readable strings associated with Bag Log Codes. Care should be taken when making changes in the Django admin interface, particularly the creation or deletion of objects, since they can have unintended consequences.
Aurora is an open source project and we welcome contributions! If you want to fix a bug, or have an idea of how to enhance the application, the process looks like this:
This repository contains a configuration file for git pre-commit hooks which help ensure that code is linted before it is checked into version control. It is strongly recommended that you install these hooks locally by installing pre-commit and running pre-commit install
.
Aurora is released under an MIT License.