Commit Graph

21 Commits

Author SHA1 Message Date
Liam Young 36ea7b385a Fix endpoint_checksums
KeystoneRequires.ep_changed() now returns a dictionary rather than
json. As a result KeystoneRequires.endpoint_checksums now throws an
exception when it tries to decode the return from ep_changed.

Change-Id: I440104679c900ce8b67ff1fca1d0ce003e5f0ef4
2022-09-19 11:25:25 +00:00
James Page 1a5142bac6 Add forwards compat with k8s operator
The new keystone-k8s operator uses the application data bag and
more up-to-date key names for endpoint and authentication information.

Check for this information and then fallback to the existing
keystone charm unit data bag data set if not found.

Update register_endpoints to also provide new application data
bag JSON encoded data when this method is called from a lead
unit.  This relies on the type and description of the endpoint
being provided which will require a charm change on adoption.

Change-Id: I921d173c64b12c35f5ffc17270a0fc2bb83891c4
2022-09-16 14:54:50 +01:00
James Page 9ad5cade97 Refactor to use Endpoint base class
The RelationBase class has been deprecated for some time and
provides no support for interaction with the application data
bag.

Migrate requires interface to Endpoint base class and refactor
as needed.

Change-Id: I82fe7df6c7c3658dd334a830442f1dcbd1e7d7e4
2022-09-08 09:44:35 +01:00
Edward Hope-Morley 501af18b30 Add service_type auto_accessors and base settings
The service_type needs to be added to keystone_authtoken
for access rules (application credentials) to work so it
is now a required parameter.

Related-Bug: #1965967
Change-Id: Ic90de9de13ad2728b9ce9de075c03f7854c417ca
2022-03-28 16:52:41 +01:00
Liam Young a4684ff27a Charm specify roles to be granted to admin
A charm joined to keystone via the identity-service relation can
now specify additional roles that can be granted to admin. This
is done by setting the relation data key `add_role_to_admin` the
value is a comma seperated list of roles that should be granted
to admin.

Change-Id: I5495c350c7ac65f8a67125734dff368577c983f4
2022-02-25 13:47:31 +00:00
David Ames a48a1e826a Collapse available and available.auth
Most reactive charms react on identity-service.available but the
current interface distinguishes between available and available.auth. It
is somewhat assumed by most charms that identity-service.available is
equivalent to identity-service.available.auth, as what charms are
concerned with is the ability to authenticate against the cloud.

Collapse the difference between identity-service.available and
identity-service.available.auth.

Continue to set identity-service.available.auth for any charms that may
rely on it.

Change-Id: I494feea5f3ef8706140ce712b1e025e52b0dfbd1
Closes-Bug: #1818113
2020-07-16 14:21:58 -07:00
James Page b365c78a21 Add optional admin_* keys to keystone interface
The keystone charm may provide ID information about the admin
user, project and domain.

These are used to build trusts between service accounts and the
main cloud admin account to allow priviledge escalation for
cloud applications (such as backups).

Change-Id: I9c7a9a4d218059de2ad24c8481fd263f8125a8e3
2020-03-05 15:07:18 +00:00
James Page 699ca9e095 Add support for endpoint change notification
Add support for recent changes to keystone to allow consuming
charms to request notification about endpoint changes.

Change-Id: Icacca3445980cdb866cb0dad90b288ce96e8c460
2020-03-03 08:35:33 +00:00
Jorge Niedbalski 5bc07627ef Add service_domain_id to the auto_accessors list.
service_domain_id might be required by dependant charms
such as aodh and should be exposed as an accessor attribute.

Partial-Bug: #1831181

Change-Id: Idae7aec048b9203d2b1a75da8d68cf97271f1b53
Signed-off-by: Jorge Niedbalski <jorge.niedbalski@canonical.com>
2019-06-04 17:06:35 +00:00
Frode Nordahl 0ec113afb7 Add support for passing optional ``requested_roles`` attribute
When passing ``requested_roles`` down the ``identity-service``
relation the Keystone charm will create the listed roles for you.

Useful for charm authors implementing charms with specific role
requirements.

Change-Id: I7c1eedb1e78ffc53ac3e0df81f6b52358dd8dfa5
Closes-Bug: #1813602
2019-01-28 16:43:11 +01:00
Seyeong Kim f4fc3175b8 Support service_domain for relation
Adding code for supporting service_domain.
Some charms need to get service_domain
from keystone relation.

Change-Id: Ic9a8ae558482cda8f28de8ff465dab15fc85f9e3
2018-09-12 18:54:53 +09:00
Liam Young c9ed6c0575 Add api_version as an accessible property
The api version that keystone is uing is advertised via the
api_version key in the identity-service relation but the interface
does not currently set it as a property.

Change-Id: I3b0ee1f22d1c6afee54e1faf315400ca1f8adf77
2016-08-01 12:47:51 +00:00
Liam Young 4b966c920b Add support for extracting and decoding SSL keys and certs from interfaces 2016-06-24 06:06:01 +00:00
Alex Kavanagh 881e13792e Revert "Add unit tests to the interface"
This reverts commit 133fedca1a.

Reverting this commit (temporarily) until charm-tools merge 193 is
released.
2016-04-29 16:48:26 +00:00
Alex Kavanagh 133fedca1a Add unit tests to the interface
This adds unit tests to the interface-keystone and provides ostestr
support, and a makefile to allow easy 'make lint' and 'make test'
commands.  All tests are performed in tox environments.  At present this
is py27.
2016-04-22 16:09:04 +00:00
Liam Young 5118017e3a Fix lint 2015-12-07 15:19:54 +00:00
Liam Young 5a1fd1fecd Support requesting keystone endpoint information and differentiaite between old and new ssl info 2015-12-07 15:17:39 +00:00
Liam Young fd929c0831 gitignore .tox and update to handle all ssl data back from keystone 2015-12-07 12:59:00 +00:00
Liam Young 13c6c40998 Fix name of *_tenant_id var passed back from keystone 2015-12-07 11:47:24 +00:00
Liam Young fab262721a Fix checking auto_accessors for none 2015-12-07 10:57:58 +00:00
Liam Young 3ff28b362e initial version 2015-12-07 10:37:06 +00:00