Add config key oidc-client-id
The client id is part of the configuration information that the operator is expected to hand over to the charm since it's part of the client's auth configuration.
This commit is contained in:
@@ -1,4 +1,9 @@
|
|||||||
options:
|
options:
|
||||||
|
oidc-client-id:
|
||||||
|
default: ''
|
||||||
|
type: string
|
||||||
|
description: |
|
||||||
|
Client identifier.
|
||||||
oidc-provider-metadata-url:
|
oidc-provider-metadata-url:
|
||||||
default: ''
|
default: ''
|
||||||
type: string
|
type: string
|
||||||
|
|||||||
@@ -23,9 +23,8 @@ from typing import List
|
|||||||
from uuid import uuid4
|
from uuid import uuid4
|
||||||
|
|
||||||
from ops.main import main
|
from ops.main import main
|
||||||
from ops.model import StatusBase, ActiveStatus
|
from ops.model import StatusBase, ActiveStatus, BlockedStatus
|
||||||
|
|
||||||
import ops.model
|
|
||||||
import ops_openstack.core
|
import ops_openstack.core
|
||||||
|
|
||||||
from ops_openstack.adapters import (
|
from ops_openstack.adapters import (
|
||||||
@@ -216,8 +215,11 @@ class KeystoneOpenIDCCharm(ops_openstack.core.OSBaseCharm):
|
|||||||
return {'apache2': self.request_restart}
|
return {'apache2': self.request_restart}
|
||||||
|
|
||||||
def is_data_ready(self):
|
def is_data_ready(self):
|
||||||
|
if not self.model.get_relation('cluster'):
|
||||||
|
return False
|
||||||
|
|
||||||
options = KeystoneOpenIDCOptions(self)
|
options = KeystoneOpenIDCOptions(self)
|
||||||
required_keys = ['oidc_crypto_passphrase']
|
required_keys = ['oidc_crypto_passphrase', 'oidc_client_id']
|
||||||
for key in required_keys:
|
for key in required_keys:
|
||||||
if getattr(options, key) == None: # noqa: E711
|
if getattr(options, key) == None: # noqa: E711
|
||||||
return False
|
return False
|
||||||
|
|||||||
Reference in New Issue
Block a user