From f3a48287702f008530e246bc459d2808b12d43fb Mon Sep 17 00:00:00 2001 From: George Jahad Date: Wed, 9 Oct 2024 20:14:53 -0700 Subject: [PATCH] cleanup local names --- app/lib/clients/vault/oidc.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/lib/clients/vault/oidc.rb b/app/lib/clients/vault/oidc.rb index 1e104f9..176070c 100644 --- a/app/lib/clients/vault/oidc.rb +++ b/app/lib/clients/vault/oidc.rb @@ -99,14 +99,14 @@ def create_userpass_for_initial_user end def map_userpass_to_entity - op_entity = oidc_provider.logical.read( + entity = oidc_provider.logical.read( "identity/entity/name/#{Config[:initial_user][:name]}") - op_entity_id = op_entity.data[:id] - op_auth_list = oidc_provider.logical.read("/sys/auth") - up_accessor = op_auth_list.data[:"userpass/"][:accessor] + entity_id = entity.data[:id] + auth_list = oidc_provider.logical.read("/sys/auth") + up_accessor = auth_list.data[:"userpass/"][:accessor] oidc_provider.logical.write("identity/entity-alias", name: Config[:initial_user][:name], - canonical_id: op_entity_id, + canonical_id: entity_id, mount_accessor: up_accessor) end