This repository has been archived by the owner. It is now read-only.
Authentication, Authorization, and API Proxy Service
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
bin
brave
conf
etc
tests
tools
var
.gitignore
.travis.yml
INSTALL.md
MANIFEST.in
README.textile
UPDATE-README
Vagrantfile
babel.cfg
lint.py
permissions.txt
requirements.txt
setup.cfg
setup.py
startup.py
test.ini
update_chars.py
update_keys.py

README.textile

Brave Collective Core Services

An EVE online authentication and mediated API access application.

© 2013-2014, Alice Bevan-McGregor and contributors.

https://github.com/bravecollective/core

1. What is Brave Collective Core?

  • User management.
  • EVE Online API key management.
  • Third-party application registration.
  • Authentication of users for third-party applications.
  • Authorization of EVE API access by users for third-party applications.
  • Access control list group/role definition for use by third-party applications.

2. Installation

Development takes place on GitHub in the core project. Issue tracking, documentation, and downloads are provided there.

You will require an installed and running MongoDB installation. Installation and configuration of MongoDB is beyond the scope of this documentation.

You will require a working and up-to-date virtualenv installation. The first step is always to create an environment:

virtualenv brave

Once you have this, enter and activate the virtual environment:

cd brave
source bin/activate

Installing the current development version of the Core Service requires Git, a distributed source code management system. Compilation additionally requires the Python development headers and the OpenSSL development headers. In Debian/Ubuntu, these are found in packages `python-dev` and `libssl-dev`.
Run the following to download the development version with Git, and link it into your Python runtime:

git clone https://github.com/bravecollective/core.git
cd core
pip install -r requirements.txt -e .

Once you have successfully compiled the Core Service, copy `conf/development.ini` to `conf/local.ini`, and make changes as appropriate. Finally, bootstrap the EVE API system by running:

paster shell conf/local.ini # or don't mention an INI if you didn't customize
from brave.core.util.eve import populate_calls
populate_calls()

from brave.core.permission.controller import init_perms
init_perms()

You can upgrade to the latest version at any time:

(cd core; git pull; python setup.py develop)

If you would like to make changes and contribute them back to the project, fork the GitHub project, make your changes, and submit a pull request. This process is beyond the scope of this documentation; for more information, see GitHub’s documentation.

3. Running the Service

Make a copy of development.ini called local.ini, update all relevant directives (related to storage of sessions, cache data, and database URI) and run the following to serve content locally:

paster serve local.ini

This will start a development server and present the URL you need to access. (Generally http://127.0.0.1:8080.) If you wish the server to automatically restart in the event of a change to one of the source files (templates and statically served content are exempt) add the --reload switch.

4. Common admin tasks

There will be UI for these, but in the meantime, here are some hints for doing admin tasks from the paster shell. Do apply common-sense checking along your way to make sure you’re touching the right objects.

4.1 Making yourself an admin

You must have a character added to your account and selected as primary.

from brave.core.account.model import User
from brave.core.character.model import EVECharacter
from brave.core.permission.model import Permission, WildcardPermission
u = User.objects(username="USERNAME_HERE")[0]
u.admin = True
c = u.primary
p1 = Permission.objects(id='core.*').first()
c.personal_permissions.append(p1)
c.save()
u.save()

5. License

Brave Collective Core Services has been released under the MIT Open Source license.

5.1. The MIT License

Copyright © 2013-2014 Alice Bevan-McGregor and contributors.

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.