Hammer auth login oauth (RH SSO) : Error: no implicit conversion of nil into String

Problem:

Hello, still trying to get a toker for hammer using this synthax :

hammer --verify-ssl false auth login oauth -u xxxx --two-factor --oidc-token-endpoint https://xxxx/protocol/openid-connect/token --oidc-authorization-endpoint https://xxx/auth/realms/xxx/protocol/openid-onnect/auth --oidc-client-id foreman-client --oidc-redirect-uri urn:ietf:wg:oauth:2.0:oob
Enter URL in browser: https://idp-fm.worldline-solutions.com/auth/realms/xxx/protocol/openid-connect/auth?response_type=code&client_id=foreman-client&redirect_ri=urn:ietf:wg:oauth:2.0:oob&scope=openid
Code: 84e1d248-e725-4e62-b336-d2e21726f29f.697e1887-3a6a-45ab-93d0-c6450a753dcb.6ddca544-6a03-4826-b2e3-5d6a4ba78e61
Error: no implicit conversion of nil into String

Any help please ?
Regards

Foreman 3.7.0

Here is the log from the hammer output :

$ hammer -d --verify-ssl false auth login oauth -u usernameA --two-factor --oidc-token-endpoint https://idp-fm.company-solutions.com/auth/realms/company-GLOBAL/protocol/openid-connect/token --oidc-authorization-endpoint https://idp-fm.company-solutions.com/auth/realms/company-GLOBAL/protocol/openid-connect/auth --oidc-client-id foreman-client --oidc-redirect-uri urn:ietf:wg:oauth:2.0:oob
[ INFO 2023-11-13T10:25:37 Init] Initialization of Hammer CLI (3.7.0) has started…
[DEBUG 2023-11-13T10:25:37 Init] Running at ruby 2.7.8-p225
[ INFO 2023-11-13T10:25:37 Init] Configuration from the file /etc/hammer/cli_config.yml has been loaded
[ INFO 2023-11-13T10:25:37 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman.yml has been loaded
[ INFO 2023-11-13T10:25:37 Init] Configuration from the file /etc/hammer/cli.modules.d/foreman_puppet.yml has been loaded
[ INFO 2023-11-13T10:25:37 Init] Configuration from the file /home/usernamA/.hammer/cli.modules.d/foreman.yml has been loaded
[DEBUG 2023-11-13T10:25:37 SSLoptions] SSL options: {
:verify_ssl => false
}
[DEBUG 2023-11-13T10:25:37 API] Global headers: {
:content_type => “application/json”,
:accept => “application/json;version=2”,
“Accept-Language” => “en”
}
[DEBUG 2023-11-13T10:25:37 API] Follow redirects: never
[DEBUG 2023-11-13T10:25:37 Connection] Registered: foreman
[ INFO 2023-11-13T10:25:37 API] Server: https://localhost/
[ INFO 2023-11-13T10:25:37 API] GET /apidoc/apipie_checksum
[DEBUG 2023-11-13T10:25:37 API] Params: {}
[DEBUG 2023-11-13T10:25:37 API] Headers: {
:accept => “application/json”,
:params => {}
}
[DEBUG 2023-11-13T10:25:37 API] Response: {
“checksum” => “6291ea060940c5e01366cabf0b07df440aaa0b61”
}
[DEBUG 2023-11-13T10:25:37 API] Response headers: {
:date => “Mon, 13 Nov 2023 09:25:37 GMT”,
:server => “Apache”,
:content_type => “application/json; charset=utf-8”,
:apipie_checksum => “6291ea060940c5e01366cabf0b07df440aaa0b61”,
:etag => “W/"b4d8d946014b80bdcbbaeca4a06b0979"”,
:cache_control => “max-age=0, private, must-revalidate”,
:x_request_id => “b11c6bf1-212d-40fc-93b9-f30d71edf759”,
:x_runtime => “0.006188”,
:strict_transport_security => “max-age=631139040; includeSubdomains”,
:x_frame_options => “sameorigin”,
:x_content_type_options => “nosniff”,
:x_xss_protection => “1; mode=block”,
:x_download_options => “noopen”,
:x_permitted_cross_domain_policies => “none”,
:content_security_policy => “default-src ‘self’; child-src ‘self’; connect-src ‘self’ ws: wss:; img-src ‘self’ data:; script-src ‘unsafe-eval’ ‘unsafe-inline’ ‘self’; style-src ‘unsafe-inline’ ‘self’”,
:content_length => “59”,
:via => “1.1 opfor01s.foreman-install.company.com
}
[DEBUG 2023-11-13T10:25:37 HammerCLIForeman::CommandExtensions::OptionSources] Added predefined options for HammerCLIForeman::Command:
[ INFO 2023-11-13T10:25:37 Extensions] Applied HammerCLIForeman::CommandExtensions::OptionSources for all except nothing on HammerCLIForeman::Command.
[DEBUG 2023-11-13T10:25:37 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::ListCommand: [:fields]
[ INFO 2023-11-13T10:25:37 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for all except nothing on HammerCLIForeman::ListCommand.
[DEBUG 2023-11-13T10:25:37 HammerCLIForeman::CommandExtensions::Fields] Added predefined options for HammerCLIForeman::InfoCommand: [:fields]
[ INFO 2023-11-13T10:25:37 Extensions] Applied HammerCLIForeman::CommandExtensions::Fields for all except nothing on HammerCLIForeman::InfoCommand.
[DEBUG 2023-11-13T10:25:37 HammerCLIForeman::CommandExtensions::UpdateCommon] Added predefined options for HammerCLIForeman::UpdateCommand:
[ INFO 2023-11-13T10:25:37 Extensions] Applied HammerCLIForeman::CommandExtensions::UpdateCommon for all except nothing on HammerCLIForeman::UpdateCommand.
[ INFO 2023-11-13T10:25:38 Modules] Extension module hammer_cli_foreman (3.7.0) loaded.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForemanPuppet::SmartClassParameter::ListCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForemanPuppet::SmartClassParameter::ListCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForemanPuppet::SmartClassParameter::ListCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForemanPuppet::PuppetEnvironment::SCParamsCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForemanPuppet::PuppetEnvironment::SCParamsCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForemanPuppet::PuppetEnvironment::SCParamsCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForemanPuppet::PuppetClass::ListCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForemanPuppet::PuppetClass::ListCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForemanPuppet::PuppetClass::ListCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForemanPuppet::PuppetClass::InfoCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForemanPuppet::PuppetClass::InfoCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForemanPuppet::PuppetClass::InfoCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
#<Proc:0x000055f96483b090 /usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for all except nothing on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2023-11-13T10:25:38 #Class:0x000055f964fe0570] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2023-11-13T10:25:38 #Class:0x000055f964fe0570] Saved block for HammerCLIForeman::Host::CreateCommand help definition:
#<Proc:0x000055f964fe0430 /usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2023-11-13T10:25:38 Extensions] Applied #Class:0x000055f964fe0570 for all except nothing on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
#<Proc:0x000055f96483b090 /usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/command_extensions/hosts/help/interfaces.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForeman::CommandExtensions::Hosts::Help::Interfaces for all except nothing on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 #Class:0x000055f962ec62e0] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 #Class:0x000055f962ec62e0] Saved block for HammerCLIForeman::Host::UpdateCommand help definition:
#<Proc:0x000055f962ec4aa8 /usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/command_extensions/hosts/help/compute_resources.rb:45>
[ INFO 2023-11-13T10:25:38 Extensions] Applied #Class:0x000055f962ec62e0 for all except nothing on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::ListCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Host::ListCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Host::ListCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Host::CreateCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Added predefined options for HammerCLIForeman::Host::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::CreateCommand:
#<Proc:0x000055f964fe7d98 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:14>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::CreateCommand:
#<Proc:0x000055f964fe7ca8 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:24>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::CreateCommand:
#<Proc:0x000055f964fe7be0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:30>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::CreateCommand:
#<Proc:0x000055f964fe7b18 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:33>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy for all except nothing on HammerCLIForeman::Host::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Host::UpdateCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Added predefined options for HammerCLIForeman::Host::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::UpdateCommand:
#<Proc:0x000055f964fe7d98 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:14>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::UpdateCommand:
#<Proc:0x000055f964fe7ca8 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:24>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::UpdateCommand:
#<Proc:0x000055f964fe7be0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:30>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy] Called option family block for HammerCLIForeman::Host::UpdateCommand:
#<Proc:0x000055f964fe7b18 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:33>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::HostPuppetProxy for all except nothing on HammerCLIForeman::Host::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::Host] Added predefined options for HammerCLIForeman::Host::InfoCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::Host] Called block for HammerCLIForeman::Host::InfoCommand output definition:
#<Proc:0x000055f964fe8068 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/host.rb:4>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::Host for all except nothing on HammerCLIForeman::Host::InfoCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Added predefined options for HammerCLIForeman::Organization::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Called option family block for HammerCLIForeman::Organization::CreateCommand:
#<Proc:0x000055f964f7d0b0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environments.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments for all except nothing on HammerCLIForeman::Organization::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Added predefined options for HammerCLIForeman::Organization::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Called option family block for HammerCLIForeman::Organization::UpdateCommand:
#<Proc:0x000055f964f7d0b0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environments.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments for all except nothing on HammerCLIForeman::Organization::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::OrganizationInfo] Added predefined options for HammerCLIForeman::Organization::InfoCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::OrganizationInfo] Called block for HammerCLIForeman::Organization::InfoCommand output definition:
#<Proc:0x000055f9647f39c0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/organization.rb:4>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::OrganizationInfo for all except nothing on HammerCLIForeman::Organization::InfoCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Added predefined options for HammerCLIForeman::Location::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Called option family block for HammerCLIForeman::Location::CreateCommand:
#<Proc:0x000055f964f7d0b0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environments.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments for all except nothing on HammerCLIForeman::Location::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Added predefined options for HammerCLIForeman::Location::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments] Called option family block for HammerCLIForeman::Location::UpdateCommand:
#<Proc:0x000055f964f7d0b0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environments.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironments for all except nothing on HammerCLIForeman::Location::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::LocationInfo] Added predefined options for HammerCLIForeman::Location::InfoCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::LocationInfo] Called block for HammerCLIForeman::Location::InfoCommand output definition:
#<Proc:0x000055f9644f8810 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/location.rb:4>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::LocationInfo for all except nothing on HammerCLIForeman::Location::InfoCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForemanPuppet::ImportPuppetClassesCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForemanPuppet::ImportPuppetClassesCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForemanPuppet::ImportPuppetClassesCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::ListCombination] Added predefined options for HammerCLIForeman::Combination::ListCombination:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::ListCombination] Called block for HammerCLIForeman::Combination::ListCombination output definition:
#<Proc:0x000055f9638e5bb8 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/combination.rb:4>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::ListCombination for all except nothing on HammerCLIForeman::Combination::ListCombination.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::InfoCombination] Added predefined options for HammerCLIForeman::Combination::InfoCombination:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::InfoCombination] Called block for HammerCLIForeman::Combination::InfoCombination output definition:
#<Proc:0x000055f9638e5848 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/combination.rb:10>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::InfoCombination for all except nothing on HammerCLIForeman::Combination::InfoCombination.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Combination::InfoCombination:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Combination::InfoCombination:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Combination::InfoCombination.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Combination::UpdateCombination:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Combination::UpdateCombination:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Combination::UpdateCombination.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Combination::CreateCombination:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Combination::CreateCombination:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Combination::CreateCombination.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Hostgroup::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Hostgroup::CreateCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Hostgroup::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Added predefined options for HammerCLIForeman::Hostgroup::CreateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Added option for HammerCLIForeman::Hostgroup::CreateCommand: {:switches=>“–puppet-ca-proxy”, :type=>“PUPPET_CA_PROXY_NAME”, :description=>“Name of Puppet CA proxy”, :opts=>{}, :block=>nil}
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Added option for HammerCLIForeman::Hostgroup::CreateCommand: {:switches=>“–puppet-proxy”, :type=>“PUPPET_PROXY_NAME”, :description=>“Name of Puppet proxy”, :opts=>{}, :block=>nil}
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Called option family block for HammerCLIForeman::Hostgroup::CreateCommand:
#<Proc:0x000055f964f88aa0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb:20>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Called option family block for HammerCLIForeman::Hostgroup::CreateCommand:
#<Proc:0x000055f964f889b0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb:30>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy for all except nothing on HammerCLIForeman::Hostgroup::CreateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Added predefined options for HammerCLIForeman::Hostgroup::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment] Called option family block for HammerCLIForeman::Hostgroup::UpdateCommand:
#<Proc:0x000055f964f7e0f0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/environment.rb:6>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::PuppetEnvironment for all except nothing on HammerCLIForeman::Hostgroup::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Added predefined options for HammerCLIForeman::Hostgroup::UpdateCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Added option for HammerCLIForeman::Hostgroup::UpdateCommand: {:switches=>“–puppet-ca-proxy”, :type=>“PUPPET_CA_PROXY_NAME”, :description=>“Name of Puppet CA proxy”, :opts=>{}, :block=>nil}
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Added option for HammerCLIForeman::Hostgroup::UpdateCommand: {:switches=>“–puppet-proxy”, :type=>“PUPPET_PROXY_NAME”, :description=>“Name of Puppet proxy”, :opts=>{}, :block=>nil}
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Called option family block for HammerCLIForeman::Hostgroup::UpdateCommand:
#<Proc:0x000055f964f88aa0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb:20>
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy] Called option family block for HammerCLIForeman::Hostgroup::UpdateCommand:
#<Proc:0x000055f964f889b0 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb:30>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::HostgroupPuppetProxy for all except nothing on HammerCLIForeman::Hostgroup::UpdateCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupInfo] Added predefined options for HammerCLIForeman::Hostgroup::InfoCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupInfo] Called block for HammerCLIForeman::Hostgroup::InfoCommand output definition:
#<Proc:0x000055f964f88e60 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb:4>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::HostgroupInfo for all except nothing on HammerCLIForeman::Hostgroup::InfoCommand.
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupList] Added predefined options for HammerCLIForeman::Hostgroup::ListCommand:
[DEBUG 2023-11-13T10:25:38 HammerCLIForemanPuppet::CommandExtensions::HostgroupList] Called block for HammerCLIForeman::Hostgroup::ListCommand output definition:
#<Proc:0x000055f964f88cf8 /usr/share/gems/gems/hammer_cli_foreman_puppet-0.0.6/lib/hammer_cli_foreman_puppet/command_extensions/hostgroup.rb:10>
[ INFO 2023-11-13T10:25:38 Extensions] Applied HammerCLIForemanPuppet::CommandExtensions::HostgroupList for all except nothing on HammerCLIForeman::Hostgroup::ListCommand.
[ INFO 2023-11-13T10:25:38 Modules] Extension module hammer_cli_foreman_puppet (0.0.6) loaded.
[DEBUG 2023-11-13T10:25:38 Init] Using locale ‘en’
[DEBUG 2023-11-13T10:25:38 Init] ‘mo’ files for locale domain ‘hammer-cli’ loaded from ‘/usr/share/gems/gems/hammer_cli-3.7.0/locale’
[DEBUG 2023-11-13T10:25:38 Init] ‘mo’ files for locale domain ‘hammer-cli-foreman’ loaded from ‘/usr/share/gems/gems/hammer_cli_foreman-3.7.0/locale’
[ INFO 2023-11-13T10:25:38 HammerCLI::MainCommand] Called with options: {“option_debug”=>true, “option_verify_ssl”=>false}
[ INFO 2023-11-13T10:25:38 HammerCLIForeman::Auth] Called with options: {}
[ INFO 2023-11-13T10:25:38 HammerCLIForeman::Auth::LoginCommand] Called with options: {}
[ INFO 2023-11-13T10:25:38 HammerCLIForeman::Auth::LoginCommand::Oauth] Called with options: {“option_username”=>“usernameA”, “option_oidc_token_endpoint”=>“https://idp-fm.company-solutions.com/auth/realms/company-GLOBAL/protocol/openid-connect/token”, “option_oidc_authorization_endpoint”=>“https://idp-fm.company-solutions.com/auth/realms/company-GLOBAL/protocol/openid-connect/auth”, “option_oidc_client_id”=>“foreman-client”, “option_two_factor”=>true, “option_oidc_redirect_uri”=>“urn:ietf:wg:oauth:2.0:oob”}
[DEBUG 2023-11-13T10:25:38 SSLoptions] SSL options: {
:verify_ssl => false
}
[DEBUG 2023-11-13T10:25:38 API] Global headers: {
:content_type => “application/json”,
:accept => “application/json;version=2”,
“Accept-Language” => “en”
}
[DEBUG 2023-11-13T10:25:38 API] Follow redirects: never
[DEBUG 2023-11-13T10:25:38 Connection] Registered: foreman
Enter URL in browser: https://idp-fm.company-solutions.com/auth/realms/company-GLOBAL/protocol/openid-connect/auth?response_type=code&client_id=foreman-client&redirect_uri=urn:ietf:wg:oauth:2.0:oob&scope=openid
Code: 5214e606-5603-40d5-be5e-3df92a458bf0.8a0a4c68-e583-4298-9901-9638f9c1dee4.6ddca544-6a03-4826-b2e3-5d6a4ba78e61
[ INFO 2023-11-13T10:25:58 API] Server: https://localhost/
[ INFO 2023-11-13T10:25:58 API] GET /api/status
[DEBUG 2023-11-13T10:25:58 API] Params: {}
[DEBUG 2023-11-13T10:25:58 API] Headers: {
:params => {}
}
[DEBUG 2023-11-13T10:25:58 API] Using authenticator: HammerCLIForeman::Api::SessionAuthenticatorWrapper
[ERROR 2023-11-13T10:25:58 API] 401 Unauthorized
[DEBUG 2023-11-13T10:25:58 API] {
“error” => {
“message” => "Unable to authenticate user "
}
}
[DEBUG 2023-11-13T10:25:58 Exception] Using exception handler HammerCLIForeman::ExceptionHandler#handle_foreman_unauthorized
[ERROR 2023-11-13T10:25:58 Exception] Invalid credentials, continuing with session for ‘usernameA’.
Invalid credentials, continuing with session for ‘usernameA’.
[ERROR 2023-11-13T10:25:58 Exception]

HammerCLIForeman::Api::UnauthorizedError (Invalid credentials, continuing with session for ‘usernameA’.):
/usr/share/gems/gems/apipie-bindings-0.6.0/lib/apipie_bindings/api.rb:249:in rescue in http_call' /usr/share/gems/gems/apipie-bindings-0.6.0/lib/apipie_bindings/api.rb:238:in http_call’
/usr/share/gems/gems/apipie-bindings-0.6.0/lib/apipie_bindings/api.rb:190:in call_action' /usr/share/gems/gems/apipie-bindings-0.6.0/lib/apipie_bindings/api.rb:185:in call’
/usr/share/gems/gems/apipie-bindings-0.6.0/lib/apipie_bindings/action.rb:14:in call' /usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/api/connection.rb:36:in login’
/usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/authenticate/login.rb:12:in execute_with_params' /usr/share/gems/gems/hammer_cli_foreman-3.7.0/lib/hammer_cli_foreman/auth.rb:81:in execute’
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in run' /usr/share/gems/gems/hammer_cli-3.7.0/lib/hammer_cli/abstract.rb:103:in run’
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in execute' /usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in run’
/usr/share/gems/gems/hammer_cli-3.7.0/lib/hammer_cli/abstract.rb:103:in run' /usr/share/gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in execute’
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in run' /usr/share/gems/gems/hammer_cli-3.7.0/lib/hammer_cli/abstract.rb:103:in run’
/usr/share/gems/gems/clamp-1.3.2/lib/clamp/subcommand/execution.rb:18:in execute' /usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:66:in run’
/usr/share/gems/gems/hammer_cli-3.7.0/lib/hammer_cli/abstract.rb:103:in run' /usr/share/gems/gems/clamp-1.3.2/lib/clamp/command.rb:140:in run’
/usr/share/gems/gems/hammer_cli-3.7.0/bin/hammer:147:in <top (required)>' /usr/bin/hammer:23:in load’
/usr/bin/hammer:23:in `’


Here is the log from the production.log :slight_smile:

2023-11-13T10:17:41 [D|dyn|] Executor heartbeat
2023-11-13T10:17:47 [I|app|416c1f2f] Started GET “/apidoc/apipie_checksum” for 127.0.0.1 at 2023-11-13 10:17:47 +0100
2023-11-13T10:17:47 [I|app|416c1f2f] Processing by Apipie::ApipiesController#apipie_checksum as JSON
2023-11-13T10:17:47 [I|app|416c1f2f] Parameters: {“apipy”=>{}}
2023-11-13T10:17:47 [D|app|416c1f2f] Rendering /usr/share/gems/gems/apipie-rails-1.1.0/app/views/apipie/apipies/apipie_checksum.json.erb
2023-11-13T10:17:47 [I|app|416c1f2f] Rendered /usr/share/gems/gems/apipie-rails-1.1.0/app/views/apipie/apipies/apipie_checksum.json.erb (Duration: 0.1ms | Allocations: 7)
2023-11-13T10:17:47 [I|app|416c1f2f] Completed 200 OK in 2ms (Views: 1.0ms | Allocations: 433)
2023-11-13T10:17:56 [D|dyn|] Executor heartbeat
2023-11-13T10:18:11 [D|dyn|] Executor heartbeat
2023-11-13T10:18:24 [I|app|97571f1c] Started GET “/api/status” for 127.0.0.1 at 2023-11-13 10:18:24 +0100
2023-11-13T10:18:24 [I|app|97571f1c] Processing by Api::V2::HomeController#status as JSON
2023-11-13T10:18:24 [I|app|97571f1c] Parameters: {“apiv”=>“v2”, “home”=>{}}
2023-11-13T10:18:24 [D|app|97571f1c] Updated cached value for setting=oidc_audience
2023-11-13T10:18:24 [W|app|97571f1c] Failed to decode JWT
2023-11-13T10:18:24 [I|app|97571f1c] Backtrace for ‘Failed to decode JWT’ error (JWT::DecodeError): Nil JSON web token
97571f1c | /usr/share/gems/gems/jwt-2.7.0/lib/jwt/decode.rb:13:in initialize' 97571f1c | /usr/share/gems/gems/jwt-2.7.0/lib/jwt.rb:29:in new’
97571f1c | /usr/share/gems/gems/jwt-2.7.0/lib/jwt.rb:29:in decode' 97571f1c | /usr/share/foreman/app/services/jwt_token.rb:54:in decoded_payload’
97571f1c | /usr/share/foreman/app/services/sso/jwt.rb:49:in no_issuer?' 97571f1c | /usr/share/foreman/app/services/sso/jwt.rb:6:in available?’
97571f1c | /usr/share/foreman/app/services/sso.rb:6:in each' 97571f1c | /usr/share/foreman/app/services/sso.rb:6:in find’
97571f1c | /usr/share/foreman/app/services/sso.rb:6:in get_available' 97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/authentication.rb:5:in available_sso’
97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/authentication.rb:64:in sso_authentication' 97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/authentication.rb:12:in authenticate’
97571f1c | /usr/share/foreman/app/controllers/api/base_controller.rb:200:in authorize' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:427:in block in make_lambda’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:198:in block (2 levels) in halting' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:34:in block (2 levels) in module:Callbacks
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:199:in block in halting' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in block in invoke_before’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in each' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in invoke_before’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:115:in block in run_callbacks' 97571f1c | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in clear_thread’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks' 97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in set_topbar_sweeper_controller’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks' 97571f1c | /usr/share/gems/gems/audited-5.3.3/lib/audited/sweeper.rb:16:in around’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks' 97571f1c | /usr/share/gems/gems/audited-5.3.3/lib/audited/sweeper.rb:16:in around’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:137:in run_callbacks’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:41:in process_action' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/rescue.rb:22:in process_action’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/instrumentation.rb:34:in block in process_action' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/notifications.rb:203:in block in instrument’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/notifications/instrumenter.rb:24:in instrument' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/notifications.rb:203:in instrument’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/instrumentation.rb:33:in process_action' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/params_wrapper.rb:249:in process_action’
97571f1c | /usr/share/gems/gems/activerecord-6.1.7.4/lib/active_record/railties/controller_runtime.rb:27:in process_action' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/base.rb:165:in process’
97571f1c | /usr/share/gems/gems/actionview-6.1.7.4/lib/action_view/rendering.rb:39:in process' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal.rb:190:in dispatch’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal.rb:254:in dispatch' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/route_set.rb:50:in dispatch’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/route_set.rb:33:in serve' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/mapper.rb:19:in block in class:Constraints
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/mapper.rb:49:in serve' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/router.rb:50:in block in serve’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/router.rb:32:in each' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/router.rb:32:in serve’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/route_set.rb:842:in call' 97571f1c | /usr/share/gems/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in call’
97571f1c | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/static_dispatcher.rb:68:in call' 97571f1c | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/extractor/recorder.rb:139:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/static.rb:24:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/static.rb:24:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/static.rb:24:in call' 97571f1c | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in call’
97571f1c | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call' 97571f1c | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/middleware/checksum_in_headers.rb:27:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/tempfile_reaper.rb:15:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/etag.rb:27:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/conditional_get.rb:27:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/head.rb:12:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/http/permissions_policy.rb:22:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/http/content_security_policy.rb:19:in call’
97571f1c | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:266:in context’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:260:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/cookies.rb:697:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/callbacks.rb:27:in block in call' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:98:in run_callbacks’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/callbacks.rb:26:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/debug_exceptions.rb:29:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in call’
97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/rack/logger.rb:37:in call_app' 97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/rack/logger.rb:28:in call’
97571f1c | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in call' 97571f1c | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/remote_ip.rb:81:in call' 97571f1c | /usr/share/gems/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/request_id.rb:26:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/method_override.rb:24:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/runtime.rb:22:in call' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/executor.rb:14:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/sendfile.rb:110:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/ssl.rb:77:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/host_authorization.rb:142:in call’
97571f1c | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in call' 97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/engine.rb:539:in call’
97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/railtie.rb:207:in public_send' 97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/railtie.rb:207:in method_missing’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:74:in block in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in each’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in call' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/configuration.rb:270:in call’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/request.rb:98:in block in handle_request' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:340:in with_force_shutdown’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/request.rb:97:in handle_request' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/server.rb:431:in process_client’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/server.rb:233:in block in run' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:147:in block in spawn_thread’
97571f1c | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context' 2023-11-13T10:18:24 [W|app|97571f1c] Failed to decode JWT 2023-11-13T10:18:24 [I|app|97571f1c] Backtrace for 'Failed to decode JWT' error (JWT::DecodeError): Nil JSON web token 97571f1c | /usr/share/gems/gems/jwt-2.7.0/lib/jwt/decode.rb:13:in initialize’
97571f1c | /usr/share/gems/gems/jwt-2.7.0/lib/jwt.rb:29:in new' 97571f1c | /usr/share/gems/gems/jwt-2.7.0/lib/jwt.rb:29:in decode’
97571f1c | /usr/share/foreman/app/services/jwt_token.rb:54:in decoded_payload' 97571f1c | /usr/share/foreman/app/services/sso/openid_connect.rb:65:in valid_issuer?’
97571f1c | /usr/share/foreman/app/services/sso/openid_connect.rb:11:in available?' 97571f1c | /usr/share/foreman/app/services/sso.rb:6:in each’
97571f1c | /usr/share/foreman/app/services/sso.rb:6:in find' 97571f1c | /usr/share/foreman/app/services/sso.rb:6:in get_available’
97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/authentication.rb:5:in available_sso' 97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/authentication.rb:64:in sso_authentication’
97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/authentication.rb:12:in authenticate' 97571f1c | /usr/share/foreman/app/controllers/api/base_controller.rb:200:in authorize’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:427:in block in make_lambda' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:198:in block (2 levels) in halting’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:34:in block (2 levels) in <module:Callbacks>' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:199:in block in halting’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in block in invoke_before' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in each’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:512:in invoke_before' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:115:in block in run_callbacks’
97571f1c | /usr/share/foreman/app/models/concerns/foreman/thread_session.rb:32:in clear_thread' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks’
97571f1c | /usr/share/foreman/app/controllers/concerns/foreman/controller/topbar_sweeper.rb:12:in set_topbar_sweeper_controller' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks’
97571f1c | /usr/share/gems/gems/audited-5.3.3/lib/audited/sweeper.rb:16:in around' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks’
97571f1c | /usr/share/gems/gems/audited-5.3.3/lib/audited/sweeper.rb:16:in around' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:126:in block in run_callbacks’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:137:in run_callbacks' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/callbacks.rb:41:in process_action’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/rescue.rb:22:in process_action' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/instrumentation.rb:34:in block in process_action’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/notifications.rb:203:in block in instrument' 97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/notifications/instrumenter.rb:24:in instrument’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/notifications.rb:203:in instrument' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/instrumentation.rb:33:in process_action’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal/params_wrapper.rb:249:in process_action' 97571f1c | /usr/share/gems/gems/activerecord-6.1.7.4/lib/active_record/railties/controller_runtime.rb:27:in process_action’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/abstract_controller/base.rb:165:in process' 97571f1c | /usr/share/gems/gems/actionview-6.1.7.4/lib/action_view/rendering.rb:39:in process’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal.rb:190:in dispatch' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_controller/metal.rb:254:in dispatch’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/route_set.rb:50:in dispatch' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/route_set.rb:33:in serve’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/mapper.rb:19:in block in <class:Constraints>' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/mapper.rb:49:in serve’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/router.rb:50:in block in serve' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/router.rb:32:in each’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/journey/router.rb:32:in serve' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/routing/route_set.rb:842:in call’
97571f1c | /usr/share/gems/gems/apipie-dsl-2.5.0/lib/apipie_dsl/static_dispatcher.rb:67:in call' 97571f1c | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/static_dispatcher.rb:68:in call’
97571f1c | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/extractor/recorder.rb:139:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/static.rb:24:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/static.rb:24:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/static.rb:24:in call’
97571f1c | /usr/share/foreman/lib/foreman/middleware/libvirt_connection_cleaner.rb:9:in call' 97571f1c | /usr/share/foreman/lib/foreman/middleware/telemetry.rb:10:in call’
97571f1c | /usr/share/gems/gems/apipie-rails-1.1.0/lib/apipie/middleware/checksum_in_headers.rb:27:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/tempfile_reaper.rb:15:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/etag.rb:27:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/conditional_get.rb:27:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/head.rb:12:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/http/permissions_policy.rb:22:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/http/content_security_policy.rb:19:in call' 97571f1c | /usr/share/foreman/lib/foreman/middleware/logging_context_session.rb:22:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:266:in context' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/session/abstract/id.rb:260:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/cookies.rb:697:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/callbacks.rb:27:in block in call’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/callbacks.rb:98:in run_callbacks' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/callbacks.rb:26:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/actionable_exceptions.rb:18:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/debug_exceptions.rb:29:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/show_exceptions.rb:33:in call' 97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/rack/logger.rb:37:in call_app’
97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/rack/logger.rb:28:in call' 97571f1c | /usr/share/gems/gems/sprockets-rails-3.4.2/lib/sprockets/rails/quiet_assets.rb:13:in call’
97571f1c | /usr/share/foreman/lib/foreman/middleware/logging_context_request.rb:11:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/remote_ip.rb:81:in call’
97571f1c | /usr/share/gems/gems/request_store-1.5.1/lib/request_store/middleware.rb:19:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/request_id.rb:26:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/method_override.rb:24:in call' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/runtime.rb:22:in call’
97571f1c | /usr/share/gems/gems/activesupport-6.1.7.4/lib/active_support/cache/strategy/local_cache_middleware.rb:29:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/executor.rb:14:in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/sendfile.rb:110:in call' 97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/ssl.rb:77:in call’
97571f1c | /usr/share/gems/gems/actionpack-6.1.7.4/lib/action_dispatch/middleware/host_authorization.rb:142:in call' 97571f1c | /usr/share/gems/gems/secure_headers-6.5.0/lib/secure_headers/middleware.rb:11:in call’
97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/engine.rb:539:in call' 97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/railtie.rb:207:in public_send’
97571f1c | /usr/share/gems/gems/railties-6.1.7.4/lib/rails/railtie.rb:207:in method_missing' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:74:in block in call’
97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in each' 97571f1c | /usr/share/gems/gems/rack-2.2.7/lib/rack/urlmap.rb:58:in call’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/configuration.rb:270:in call' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/request.rb:98:in block in handle_request’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:340:in with_force_shutdown' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/request.rb:97:in handle_request’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/server.rb:431:in process_client' 97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/server.rb:233:in block in run’
97571f1c | /usr/share/gems/gems/puma-6.2.2/lib/puma/thread_pool.rb:147:in block in spawn_thread' 97571f1c | /usr/share/gems/gems/logging-2.3.1/lib/logging/diagnostic_context.rb:474:in block in create_with_logging_context’
2023-11-13T10:18:24 [E|app|97571f1c] Invalid JWT received, please check connectivity with the OpenID Provider
2023-11-13T10:18:24 [D|app|97571f1c] Rendering layout api/v2/layouts/error_layout.json.erb
2023-11-13T10:18:24 [D|app|97571f1c] Rendering api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout
2023-11-13T10:18:24 [I|app|97571f1c] Rendered api/v2/errors/unauthorized.json.rabl within api/v2/layouts/error_layout (Duration: 0.4ms | Allocations: 79)
2023-11-13T10:18:24 [I|app|97571f1c] Rendered layout api/v2/layouts/error_layout.json.erb (Duration: 0.6ms | Allocations: 178)
2023-11-13T10:18:24 [I|app|97571f1c] Filter chain halted as :authorize rendered or redirected
2023-11-13T10:18:24 [I|app|97571f1c] Completed 401 Unauthorized in 7ms (Views: 1.3ms | ActiveRecord: 0.8ms | Allocations: 1413)
2023-11-13T10:18:26 [D|dyn|] Executor heartbeat

THANK YOU TO HELP ME

SOLVED by myself a a great cost of time :

This error is notably linked to the paucity of documentation regarding this authentication method. In particular, the bubble type help in the OIDC Audience documentation section only stipulates a single possible value, whereas for the provision of tokens the team in charge of keycloack may need to define several clients. Foreman accepts a comma when you put several but it took the chance of a video where it appeared for me to discover this possibility. At least the documentation needs to be updated.