From 977d5fcb0ed2627d0300e2a5c61afdf4732c5854 Mon Sep 17 00:00:00 2001 From: Alain Lavoie Date: Wed, 10 Sep 2025 11:38:21 -0400 Subject: [PATCH 1/2] MC-30191: Keystone does not allow the type anymore for use/password auth --- core/pom.xml | 2 +- .../identity/v3/domain/KeystoneAuth.java | 24 ++++++++++--------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/core/pom.xml b/core/pom.xml index 1fbcb044..de541516 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -6,7 +6,7 @@ 4.0.0 openstack4j-core - co-3.12.2 + co-3.12.3 OpenStack4j Core OpenStack Java API https://github.com/openstack4j/openstack4j/ diff --git a/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java b/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java index cbdbe3d6..6f5174c4 100644 --- a/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java +++ b/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java @@ -51,7 +51,6 @@ public KeystoneAuth(String userId, String password) { public KeystoneAuth(String user, String password, Identifier domain, AuthScope scope) { this.identity = AuthIdentity.createCredentialType(user, password, domain); this.scope = scope; - this.type = Type.CREDENTIALS; } public KeystoneAuth(AuthScope scope, Type type) { @@ -200,13 +199,15 @@ public AuthUser(String username, String password, Identifier domainIdentifier) { this.password = password; if (domainIdentifier != null) { domain = new AuthDomain(); - if (domainIdentifier.isTypeID()) - domain.setId(domainIdentifier.getId()); - else - domain.setName(domainIdentifier.getId()); + if (domainIdentifier.isTypeID()) { + domain.setId(domainIdentifier.getId()); + } else { + domain.setName(domainIdentifier.getId()); + } setName(username); - } else - setId(username); + } else { + setId(username); + } } @Override @@ -342,10 +343,11 @@ public static final class AuthDomain extends BasicResourceEntity implements Doma private String name; public AuthDomain(Identifier domain) { - if (domain.isTypeID()) - this.id = domain.getId(); - else - this.name = domain.getId(); + if (domain.isTypeID()) { + this.id = domain.getId(); + } else { + this.name = domain.getId(); + } } @Override From 75e54b25ac8fc2c205ce8ce21382f27cd9b4d286 Mon Sep 17 00:00:00 2001 From: Alain Lavoie Date: Wed, 10 Sep 2025 12:47:56 -0400 Subject: [PATCH 2/2] MC-30191: Properly fixed the serialization --- .../openstack4j/openstack/identity/v3/domain/KeystoneAuth.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java b/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java index 6f5174c4..9bc4253f 100644 --- a/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java +++ b/core/src/main/java/org/openstack4j/openstack/identity/v3/domain/KeystoneAuth.java @@ -51,6 +51,7 @@ public KeystoneAuth(String userId, String password) { public KeystoneAuth(String user, String password, Identifier domain, AuthScope scope) { this.identity = AuthIdentity.createCredentialType(user, password, domain); this.scope = scope; + this.type = Type.CREDENTIALS; } public KeystoneAuth(AuthScope scope, Type type) { @@ -62,6 +63,7 @@ protected KeystoneAuth(Type type) { this.type = type; } + @JsonIgnore public Type getType() { return type; }