Skip to content

Commit

Permalink
Fix casing and test with login.ubuntu.com
Browse files Browse the repository at this point in the history
  • Loading branch information
arturo-seijas committed Mar 22, 2024
1 parent dfb2e30 commit e5a5559
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -539,16 +539,18 @@ def _get_indico_env_config(self, container: Container) -> Dict:
},
"idp": {
"entityId": self.state.saml_config.entity_id,
"x509cert": self.state.saml_config.certificates[0],
},
}
for endpoint in self.state.saml_config.endpoints:
saml_config["idp"][endpoint.name] = {
# First letter need to be lowercase
endpoint_name = endpoint.name[:1].lower() + endpoint.name[1:]
saml_config["idp"][endpoint_name] = {
"url": str(endpoint.url),
"binding": endpoint.binding,
}
if endpoint.response_url:
saml_config["idp"][endpoint.name]["response_url"] = str(endpoint.response_url)
saml_config["idp"]["x509cert"] = self.state.saml_config.certificates[0]
auth_providers = {"ubuntu": {"type": "saml", "saml_config": saml_config}}
env_config["INDICO_AUTH_PROVIDERS"] = str(auth_providers)
identity_providers = {
Expand Down
4 changes: 2 additions & 2 deletions tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ async def saml_integrator_fixture(ops_test: OpsTest, app: Application):
"""
assert ops_test.model
saml_config = {
"metadata_url": "https://login.staging.ubuntu.com/saml/metadata",
"entity_id": "https://login.staging.ubuntu.com",
"metadata_url": "https://login.ubuntu.com/saml/metadata",
"entity_id": "https://login.ubuntu.com",
}
saml_integrator = await ops_test.model.deploy(
"saml-integrator", channel="latest/stable", config=saml_config, trust=True
Expand Down

0 comments on commit e5a5559

Please sign in to comment.