-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Signed work submissions #414
Signed work submissions #414
Conversation
https://github.com/ansible/awx/blob/devel/docs/receptor_mesh.md Our instructions for AWX execution nodes, with this, would get slightly modified to be like:
Eventually @tchellomello and others will come up with a final location for the files, I just made that up now. Where the public key corresponds to what the main cluster nodes set up. Among other people who will be making changes downstream from this @thenets is working on some ephemeral node tooling. |
Hello @fosterseth i have already tested 3 scenarios:
about the
When i ran the work on the node an unexpected error occurs: and the node stopped with an error:
About the
When i ran the work on the node this error occurs on the node side, there aren't logs about it
Should we include more logs on this feature? |
55fc36c
to
ed12f53
Compare
@yagomarques thank you, I now added proper error handling if an invalid PEM is used
|
Following up from discussion, either me or @beeankha or @jladdjr need to update AWX to accommodate the changed structure. Current output looks like: bash-4.4$ receptorctl status --json
{"Advertisements": [{"NodeID": "awx_1", "Service": "control", "Time": "2021-09-21T14:41:33.346577282Z", "ConnType": 1, "Tags": null, "WorkCommands": ["local", "kubernetes-runtime-auth", "kubernetes-incluster-auth"]}], "Connections": [{"NodeID": "receptor-hop", "Cost": 1}], "KnownConnectionCosts": {"awx_1": {"receptor-hop": 1}, "receptor-1": {"receptor-hop": 1}, "receptor-2": {"receptor-hop": 1}, "receptor-hop": {"awx_1": 1, "receptor-1": 1, "receptor-2": 1}}, "NodeID": "awx_1", "RoutingTable": {"receptor-1": "receptor-hop", "receptor-2": "receptor-hop", "receptor-hop": "receptor-hop"}, "SystemCPUCount": 8, "SystemMemoryMiB": 31855, "Version": "1.0.0.0a2"} Can you give an example output after this change with some secure work types enabled? With that, we will update: So that we will look for the "ansible-runner" work type as either a work type or a secure work type. We would like to error on the side of adding the node, because this discovery process needs to be pretty stable/reliable. |
b9539b9
to
8a58483
Compare
Remote work submissions can be digitally signed by the sender. The target node will verify the signature of the work command before starting the work unit. A pair of RSA public and private keys are created offline and distributed to the nodes. The public key should be on the node receiving work (PKIX format). The private key should be on the node submitting work (PKCS1 format).
8a58483
to
6d12cfe
Compare
Overview
Adds ability for work submissions to be digitally signed.
#377
Details
An RSA private key is added to any node authorized to submit secure work.
The corresponding RSA public key is added to any node that receives secure work.
Any work command in bar.yml that expects secure work submissions can set
verifysignature
to be true.Tell receptor to sign the work submission using the
--signwork
parameter.(on foo)
receptorctl work submit echosleep --node bar --signwork
Only nodes with the correct
work-signing
key is able to startechosleep
on bar.Notes
receptorctl status now lists secure work types. Nodes must use
--signwork
to run these work units.Verification occurs for locally submitted work as well. This is because currently the receptor control service does not know the origin of the incoming connection. Therefore, it cannot distinguish between commands submitted from remote nodes, or locally via the unix socket.
Each generated json web token is set to expire in 5 minutes.