Commit Graph

18 Commits

Author SHA1 Message Date
Luigi Toscano 77a106a85f Adapt to Keystone changes: use member instead of Member
Keystone now provides "member" by default.
It should not be a problem for upgrades when the configuration
is the default one, because Keystone is case-preserving and
Member and member are the considered the same:
https://docs.openstack.org/keystone/latest/admin/identity-case-insensitive.html

Change-Id: I3bd72631d57546dcf8b887833539fe3ccaac4e47
2018-08-08 16:11:49 +02:00
Luong Anh Tuan 158bd893b9 Replaces uuid.uuid4 with uuidutils.generate_uuid()
Change-Id: Ib72d9e74c70437678c72cebc31aee60a9e140e23
Closes-Bug: #1082248
2016-11-07 13:13:57 +07:00
Michael McCune 423d80498b add helper functions for key manager
this change adds a utils module to the castellan service package. this
module contains 3 wrapper functions to help reduce the overhead for
working with castellan.

* add sahara.service.castellan.utils module
* fixup previous usages of the castellan key manager

Change-Id: I6ad4e98ab41788022104ad2886e0ab74e4061ec3
Partial-Implements: blueprint improved-secret-storage
2016-01-11 10:12:01 -05:00
Michael McCune d148dd4d55 Initial key manager implementation
This change adds the sahara key manager and converts the proxy passwords
and swift passwords to use the castellan interface.

* adding sahara key manager
* adding castellan to requirements
* removing barbicanclient from requirements
* removing sahara.utils.keymgr and related tests
* adding castellan wrapper configs to sahara list_opts
* creating a castellan validate_config to help setup
* updating documentation for castellan usage
* fixing up tests to work with castellan
* converting all proxy password usages to use castellan
* converting job binaries to use castellan when user credentials are
  applied
* converting data source to use castellan when user credentials are
  applied

Change-Id: I8cb08a365c6175744970b1037501792fe1ddb0c7
Partial-Implements: blueprint improved-secret-storage
Closes-Bug: #1431944
2015-12-22 15:07:12 -05:00
Michael McCune f240d55ac5 Adding sessions module and keystone client upgrade
This change implements the sahara.service.sessions module with the basic
session cache object. It also adds the authentication plugin from the
keystonemiddleware into the context for rest transactions.

It also migrates the keystone client utility functions to use the new
session methodology. The trust module has been accordingly fixed to make
greater use of authentication objects instead of client objects.

* adding auth plugin to context
* adding sessions module
* adding test for sessions
* adding keystonemiddleware base auth plugin object to context on api
  call
* adding keystone session to sessions module
* refactoring keystone client to use sessions
* adding keystone methods to retrieve auth plugins, tokens, and service
  catalog
* changing sahara.service.trusts to use new keystone methods
* fixing trust tests to fit new authentication methodologies

Change-Id: I65ed4b4dcee8752bf4e66ef9e47305ff408d8d5d
Partial-Implements: bp keystone-sessions
2015-08-14 16:24:38 -04:00
Nikita Konovalov 7fb3469c6a Refactor exception is Sahara
All non-plugin exceptions are now located in one place. The constructor
usage is now brought to one pattern.

Change-Id: I794143889edf89a8ab79d0c6b8fb410da39081a0
2015-06-17 09:16:40 +00:00
Andrey Pavlov 306a14f69a Adding retry ability to keystoneclient calls
All keystoneclient calls wrapped in execute_with_retry
method to avoid occasional errors

partially implements bp clients-calls-retry

Change-Id: I3d7f09c8b867ef7b7766295815e71fd1083a14c1
2015-05-16 13:38:57 +00:00
Nikolay Starodubtsev ce62f364cd Rewrite log levels and messages
This is an initial commit to make sahara logs relevant to new
logging spec.
We need to change some log levels to become closer to the spec, also
we need to change some log messages (e.g. for INFO level).

partially-implement bp new-style-logging

Change-Id: I8e7b7c4c3f375648d2999b1d0e19b68390cc22a8
2015-03-12 17:16:06 +03:00
Ken Chen 0f59c13278 Fix some translator mistakes
Change some "_" into "_LE" or "_LW" accordingly.

Closes-Bug: #1426617
Change-Id: I4c3413df7cf35b2bdc9f441a93198bc06e70c21f
2015-02-28 14:11:50 +08:00
Andrey Pavlov 5c5491f9de Using oslo_* instead of oslo.*
Changes:
* using oslo_config instead of oslo.config
* using oslo_concurrency instead of oslo.concurrency
* using oslo_db instead of oslo.db
* using oslo_i18n instead of oslo.i18n
* using oslo_messaging instead of oslo.messaging
* using oslo_middleware instead of oslo.middleware
* using oslo_serialization instead of oslo.serialization
* using oslo_utils instead of oslo.utils

Change-Id: Ib0f18603ca5b0885256a39a96a3620d05260a272
Closes-bug: #1414587
2015-02-04 13:19:28 +03:00
Vitaly Gridnev a0c4d13e90 Migrate to oslo.log
oslo.log was added to global requirements, so we can migrate to this module.
Also we need this migration to be ensure that it works correctly with
log-improvements.

Since openstack.common.log is not dropped in oslo-incubator,
we shouldn't remove it.

Change-Id: I90468e4db812ae0b5d8a43a37206b236f8904661
Closes-bug: #1412673
2015-01-27 11:09:10 +03:00
Trevor McKay 8750ddc121 Add options supporting DataSource identifiers in job_configs
This change adds options that allow DataSource objects to be
referenced by name or uuid in the job_configs dictionary of a
job_execution. If a reference to a DataSource is found, the path
information replaces the reference.

Note, references are partially resolved in early processing to
determine whether or not a proxy user must be created.  References
are fully resolved in run_job().

Implements: blueprint edp-data-sources-in-job-configs
Change-Id: I5be62b798b86a8aaf933c2cc6b6d5a252f0a8627
2015-01-14 18:20:05 +00:00
Kazuki OIKAWA ba2a02a0f5 Fixes a job_configs update by wrong value when deleting proxy-user
Change-Id: If0d6e70b84d60560b9c7a4302e65a71adfbace1d
Closes-Bug: 1405387
2015-01-07 11:20:03 +09:00
Kazuki OIKAWA c0131bcfd9 Added ability to access a swift from vanilla-1 hive
* Generates a cluster-scoped proxy-user and keystone TRUST
* Pass a proxy-user auth and trust id to hive-server using hive-site.xml

Partially implements: blueprint edp-hive-vanilla-swift

Change-Id: I65592421b29428d3e726aaf0aaa4977378849ef0
2014-11-13 17:08:55 +09:00
Michael McCune f1facb74ae Adding a periodic task to remove zombie proxy users
Changes
* adding periodic task for user removal
* adding a wrapper function for the periodic tasks class to improve
  configuration
* refactoring proxy user delete function to allow a user id

Change-Id: I641e1650e7a5fcd96246e13b7e1d548c4a0dda25
Partial-implements: blueprint edp-swift-trust-authentication
2014-09-09 09:16:44 -04:00
Michael McCune c332e4f96d Adding trust delegation and removal for proxy users
Changes
* adding a generic keystone client creation function
* adding a function to create proxy user clients
* renaming admin client functions for clarity
* adding token delegation/removal during proxy user creation/deletion
* adding a configuration option for proxy user trust roles

Change-Id: I362a27c1b1d0c5b81d6fbbb91fc0689e339f0076
Partial-implements: blueprint edp-swift-trust-authentication
2014-09-09 09:11:37 -04:00
Michael McCune a539bcfdc9 Adding proxy user creation per job execution
Changes
* adding sahara.utils.proxy module
* adding functions to create and delete proxy users
* adding proxy user creation during job execution
* adding proxy user deletion during job execution status update
* adding sanitization for proxy configs from job execution
* adding unit test for proxy usage detection function

Partial-implements: blueprint edp-swift-trust-authentication
Change-Id: I551a14a3cb5320a27fc6104b35c3b9a08a03abda
2014-09-09 09:11:10 -04:00
Michael McCune 96b45fdfca Adding configuration and check for proxy domain
Changes
* adding configuration option for use of proxy domain
* adding configuration option for proxy domain name
* adding method to get the Domain object for the proxy

Partial-implements: blueprint edp-swift-trust-authentication
Change-Id: I369de80c918a52db5200865f754c40bc807289e4
2014-09-09 09:09:03 -04:00