Skip to content

Add fact for remote-execution pubkey#1222

Closed
bastelfreak wants to merge 1 commit intotheforeman:masterfrom
bastelfreak:fact
Closed

Add fact for remote-execution pubkey#1222
bastelfreak wants to merge 1 commit intotheforeman:masterfrom
bastelfreak:fact

Conversation

@bastelfreak
Copy link
Member

@bastelfreak bastelfreak commented May 2, 2025

This exposes the pubkey from the forman-proxy for remote execution.

root@foreman:~# puppet facts show foreman_remote_execution_pubkey --value
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDj/Sz9g2bUlqK5lP0ErpqX5XkDH3gknPPRKYt9rzA7YkVUoIfvpKh8qs4qJDzDEHJobfnDTmL+p2rMXFv2EzUJUNjUhPjm1WzcB2yOKvgAKGi+AN0iJXTbOU+PWR+oqK/xs33SkDGbG5UAFXwkBCI5NRK+QNhCXXoI0FDssMp0oTq1DhGRS9uhr/K3NLRDRfxcjsTJshm+33vYLXi+/GSxpzlpdcRjceqG46WvCeESoFZAqR3+YYCi8UF5ijhqwRRaeHOnumfRA4UzFLpvs9NzQLwvBCYynnyujDhaOQlmcurhMAW5WlWgE+nNjt9YFXlSsKmuyjGWOP8mH62WwxnCAvOnb1HAhDN9IePLEiIqkCrK9IKEx1fEouCsLwPzs6L5xLeSsmbNupQDv1jtCjSsXSy+DHUVZR/g2tkRAUjiR85SlabczwtV+DWhydHhw/A7qyhED/H3GlKNK0K0L5UkNNx1IWoKdg0EndrAxaYFjMog2v/tql3cIWUn0yYIpwE= foreman-proxy@foreman.betadots

Afterwards people can use puppetdb_query() to place the key on their systems.

This exposes the pubkey from the forman-proxy for remote execution.

```
root@foreman:~# puppet facts show foreman_remote_execution_pubkey --value
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDj/Sz9g2bUlqK5lP0ErpqX5XkDH3gknPPRKYt9rzA7YkVUoIfvpKh8qs4qJDzDEHJobfnDTmL+p2rMXFv2EzUJUNjUhPjm1WzcB2yOKvgAKGi+AN0iJXTbOU+PWR+oqK/xs33SkDGbG5UAFXwkBCI5NRK+QNhCXXoI0FDssMp0oTq1DhGRS9uhr/K3NLRDRfxcjsTJshm+33vYLXi+/GSxpzlpdcRjceqG46WvCeESoFZAqR3+YYCi8UF5ijhqwRRaeHOnumfRA4UzFLpvs9NzQLwvBCYynnyujDhaOQlmcurhMAW5WlWgE+nNjt9YFXlSsKmuyjGWOP8mH62WwxnCAvOnb1HAhDN9IePLEiIqkCrK9IKEx1fEouCsLwPzs6L5xLeSsmbNupQDv1jtCjSsXSy+DHUVZR/g2tkRAUjiR85SlabczwtV+DWhydHhw/A7qyhED/H3GlKNK0K0L5UkNNx1IWoKdg0EndrAxaYFjMog2v/tql3cIWUn0yYIpwE= foreman-proxy@foreman.betadots
```

Afterwards people can use `puppetdb_query()` to place the key on their
systems.
Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If anything, this is the wrong module for this because it's really foreman_proxy.

Then how we want people to use it is via foreman_proxy::plugin::remote_execution::ssh_user that relies on the data provided in the ENC. That's IMHO the only correct way.

If you're not using the ENC you should implement some API request to still get the data from Foreman's API.

@bastelfreak
Copy link
Member Author

ah wasn't aware of that

@bastelfreak bastelfreak closed this May 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants