Package: vault
VaultAdmin webapp for OpenStack Keystone and OpenStack Swift.Short descriptionManage users and projects on your Keystone service.Manage containers and objects on Swift. (A customized version ofdjango-swiftbrowser)How Vault worksTeamsVault has users and teams. Users have the permission to add other users to their teams. This gives them more autonomy.Keystone ProjectsUsers can create projects that will belong to their teams. A Keystone project corresponds to a Swift account.Swift AccountsUsers can create, modify or delete any container or object from accounts owned by one of their teams.AdministrationAn admin can create users and teams, as well as add and remove users from those teams. Admins can also manage Keystone projects and users.Running locally with Docker ComposeThis section describes how to use Docker Compose to locally setup Vault, running all the necessary services in containers.$makedocker-startAfter a while, Vault will be accessible at localhost:8000. The initial admin user's credentials are:username: adminpassword: adminThere will also be a non-admin user available. That user's credentials are:username: userpassword: userFor more information on the docker implementation seeDocker.Basic setup for production environmentThis section describes how to setup Vault in your own infrastructure, to facilitate administration of your existing Keystone and Swift services. In this case, Vault will run in your own environment, such as in a Virtual Machine.1. Install dependencies$pipinstall-rrequirements.txt2. Set environment variables$exportVAULT_MYSQL_DB=vault
$exportVAULT_MYSQL_USER=mysql_user
$exportVAULT_MYSQL_PASSWORD=mysql_pass
$exportVAULT_MYSQL_HOST=mysql.endpoint
$exportVAULT_MYSQL_PORT=3306$exportVAULT_KEYSTONE_USERNAME=keystone_user
$exportVAULT_KEYSTONE_PASSWORD=keystone_password
$exportVAULT_KEYSTONE_PROJECT=Vault
$exportVAULT_KEYSTONE_URL=http://keystone.endpoint:5000/v3For optional variables and more information on each of the environment variables, seeEnvironment Variables.3. Create a MySQL database and the MySQL usermysql>createdatabasevault;mysql>CREATEUSER'mysql_user'@'localhost'IDENTIFIEDBY'mysql_pass';mysql>GRANTALLPRIVILEGESONvault.*TO'mysql_user'@'localhost';Then$pythonmanage.pymigrate4. Create a superuser$pythonmanage.pycreate_user-sYou will be asked for a username, e-mail, team and password. A superuser with the provided information will be created. If the team does not yet exist, it will be created. The superuser will be added to the provided team.Optionally, you can pass the--username,--email,--teamnameand--passwordarguments, skipping the need to interactively fill out these pieces of information.The-s(or--superuser) option makes the new user a superuser, meaning it has admin privileges. For a normal user, don't use this option.5. Run$pythonmanage.pyrunserverIn a production environment, it is recommended to use a WSGI HTTP server. Here's an example usingGunicorn:gunicorn--timeout60-b0.0.0.0:$PORTvault.wsgiAuthenticationVault uses the default Django authentication, but also allows for OAuth2 authentication viadjango-all-access. To add an OAuth2 provider, simply use the Django admin. For more information, seeOAuth2 Authentication.Only admins can create new users, unless when using OAuth2 authentication.Static filesIf you want to upload Vault's static files to your current Swift cluster, simply create a project (named here as<swift-project>) and, in that project, a container (named here as<swift-container>). Then, using the credentials of a user with permission to write to that container, do the following:$pythonmanage.pycollectstatic--noinput
$swiftupload--os-username=<swift-user>--os-password=<swift-pass>--os-project-name=<swift-project>--os-auth-url=<swift-auth-url>--os-storage-url=<swift-admin-url><swift-container>vault_static/Running testspipinstall-rrequirements_test.txt
maketestsCreating new apps for VaultWhile Vault already delivers an app for Swift management and another for Keystone management, it also allows you to easily implement your own apps. This helps you centralize several services in a single, standardized web interface. For more information, seeHow to create a Vault App.DependenciesDjangoSwiftKeystoneLocaleHow to edit locale files:# In the app directorydjango-adminmakemessages--all
django-admincompilemessages--locale=pt_BR