adoptium / infrastructure

This repo contains all information about machine maintenance.
Apache License 2.0
86 stars 101 forks source link

Define ssh key distribution process #3323

Closed sxa closed 2 months ago

sxa commented 10 months ago

This is part of SSDF PO 5.1 and has been flagged elsewhere. We should have a process for distributing ssh keys wherever they are used to avoid having to bypass the checks on first connect. For example:

sxa commented 6 months ago

Note: Jenkins won't accept an ssh-rsa or ssh-dss key and will therefore requre the contents of ssh_host_ecdsa_key.pub or ssh_host_ed25519_key.pub to be used in the agent configuration

sxa commented 6 months ago

Running through https://ci.adoptium.net/label/(dockerhost||build)&&!windows/ to cover all build systems conneted over ssh (Excluding RISC-V which will ned a separate tidy up). All are configured with the ecdsa key (/etc/ssh/ssh_host_ecdsa_key.pub) unless mentioned otherwise.

sxa commented 6 months ago

@Haroon-Khel is going to look at implementing the changes for the other jenkins nodes which we connect to over ssh (The test- ones) and look at ensuring that any nodes created as part of the dockerstatic node automation will support this too.

steelhead31 commented 6 months ago

@sxa do we have an existing document for this?, otherwise I'll write a document with our current policy and processes for handling these things.

sxa commented 6 months ago

Sounds good thanks - we have no such document currently. This is very much a "let's define and document the process" issue :-)

Haroon-Khel commented 6 months ago

I have configured all of the static docker containers to connect to jenkins with host key verification, except for the nodes on https://ci.adoptium.net/label/hw.dockerhost.dockerhost-skytap-ubuntu2204-x64-1/. I think that dockerhost is down as are its nodes

steelhead31 commented 5 months ago

New document for SSH key management is here.. https://docs.google.com/document/d/1ltGOhmRKkcN-CvafiNRDZwGKCyUC8xb8lCLWBh1VJEI/edit?usp=sharing

@sxa would you mind reviewing, I think that means this issue might be complete.

sxa commented 4 months ago

I've added a few comments. On making them, I'm thinking that it might make sense to have separate recommendations for infrastructure team access (where root access is typically granted to the whole team) and for people who have "temporary" access to a user account on a machine, which I wouldn't necessarily hold to such high standards (e.g. I wouldn't mandate a particular cipher or passphrase for such an account, which would raise the barrier for access)

steelhead31 commented 4 months ago

Updates have been made, following review comments, 2 new sections added , regarding temporary/additional access and jenkins host key management.

steelhead31 commented 2 months ago

Closing, as I believe this is completed.