You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Merge remote-tracking branch 'origin/develop' into chore/extract-the-personal-vcs-access-token
Both sides add to LocalVCServletService rather than change the same
code: the build agent hardening adds its four dependencies alongside
the VCS access token service, and its shortcut returns before
authenticateUser, so it never meets the AuthenticatedUser record.
The bean budget is measured, not added up: 151 edges with a longest
chain of 10, which is develop's 143 plus three account services and
five build agent beans that turn out not to overlap.
master.xml keeps the changelogs in timestamp order, and the new
build agent test gets the constructor argument this branch added.
# stacks run under the prod profile. Every service here reads this file, so all of them share one key.
44
44
JHIPSTER_SECURITY_AUTHENTICATION_JWT_BASE64SECRET="${ARTEMIS_E2E_JWT_SECRET:?not set. Use one of the E2E runner scripts, or export it yourself: the output of openssl rand -base64 64, joined into a single line}"
45
45
46
-
# The prod profile also rejects the `buildjob_password` shipped in application-buildagent.yml / application-localvc.yml,
47
-
# which the LocalCI stacks would otherwise inherit. Artemis and the build agent run in the same container here, so one
48
-
# value covers both sides.
49
-
# checkov:skip=CKV_SECRET_6: fixture credential of the local E2E/multi-node stacks, not a deployment secret
Copy file name to clipboardExpand all lines: documentation/docs/admin/jenkins-localvc.mdx
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ artemis:
64
64
user: root
65
65
password: dummy # has to be set, but does not matter for LocalVC
66
66
build-agent-git-username: jenkins
67
-
build-agent-git-password: artemis_admin #choose some strong password and username (gives read access to all repositories)
67
+
build-agent-git-password: <choose a strong password> #gives read access to all repositories, so do not reuse another credential. Values Artemis has published, artemis_admin among them, are rejected under the prod profile
68
68
continuous-integration:
69
69
user: artemis_admin
70
70
password: artemis_admin
@@ -168,7 +168,7 @@ The following steps describe how to deploy a pre-configured version of the Jenki
168
168
user: root
169
169
password: dummy # have to be set, but does not matter for LocalVC
170
170
build-agent-git-username: jenkins
171
-
build-agent-git-password: artemis_admin #choose some strong password and username (gives read access to all repositories)
171
+
build-agent-git-password: <choose a strong password> #gives read access to all repositories, so do not reuse another credential. Values Artemis has published, artemis_admin among them, are rejected under the prod profile
Copy file name to clipboardExpand all lines: documentation/docs/admin/production-setup/multiple-artemis-instances.mdx
+9-14Lines changed: 9 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -589,28 +589,23 @@ You can make following adaptations to the `application-prod.yml`:
589
589
590
590
3. Furthermore, you will need some configuration related to version control and continuous integration.
591
591
592
-
Build agents require access to the VC server. How they authenticate for it is selected by
593
-
`artemis.version-control.build-agent-use-ssh`, and the credentials below belong to only one of the two options:
594
-
595
-
- `true` (**recommended**): each agent generates an SSH key pair at startup and authenticates with it, so there is no
596
-
shared credential to configure and `build-agent-git-username`/`build-agent-git-password` may be omitted entirely.
597
-
- `false` (default, **deprecated**): the agents clone over HTTPS with the credentials below, which you must add to the
598
-
build agents and to the localvc nodes alike.
599
-
600
-
The HTTPS credentials are therefore required only for that second configuration; the SSH setup is described after the
601
-
example below.
592
+
Build agents need to reach the VC server to clone repositories. They authenticate themselves: over HTTPS with the clone token of the build job they are running, or with an SSH key as described after the example below. Neither needs any configuration here.
602
593
603
594
```yaml
604
595
artemis:
605
596
version-control:
606
597
url: <url-to-your-vc-server>
607
598
default-branch: main # The branch that should be used as default branch for all newly created repositories. This does NOT have to be equal to the default branch of the VCS
608
-
# Artemis admin credentials
609
-
build-agent-git-username: buildjob_user # Replace with more secure credentials for production. Required for https access to localvc, and ignored when build-agent-use-ssh is true
610
-
build-agent-git-password: buildjob_password # Replace with more secure credentials for production. Required for https access to localvc, and ignored when build-agent-use-ssh is true
611
599
```
612
600
613
-
The order matters when you switch an existing installation over. Set `artemis.version-control.build-agent-use-ssh: true` on the build agents first — localvc nodes accept a registered agent's key regardless of their own setting, so builds keep working, and you can move agents one at a time — and only afterwards on the localvc nodes, where it stops that credential pair from granting build agents read access to every repository. Doing it in the other order breaks every agent still cloning over HTTPS. See [Build Agent Authentication](/admin/production-setup/security#build-agent-authentication).
601
+
Build agents need no credential from you here. Choose in this order:
602
+
603
+
1. **SSH keys, recommended.** Set `artemis.version-control.build-agent-use-ssh: true` together with `ssh-template-clone-url` and `ssh-private-key-folder-path`. Every agent then generates its own key pair at startup and publishes only the public key — nothing to distribute or rotate. Roll it out on the build agents first (localvc nodes accept a registered agent's key regardless of their own setting, so builds keep working) and on the localvc nodes afterwards.
604
+
2. **Build job clone tokens**, used automatically over HTTPS while `build-agent-use-ssh` is `false`. This needs no configuration at all.
605
+
606
+
Do **not** set `build-agent-git-username` or `build-agent-git-password` on these nodes — a node that runs local CI **refuses to start** with either of them configured, whether or not the agents use SSH. The pair is a static secret opening every repository that nothing here needs, and it belongs only to a localvc node without local CI, which is [Jenkins with LocalVC](/admin/jenkins-localvc).
607
+
608
+
Note that a multi-node setup terminates SSH on the load balancer, which hides the real client from the SSH server. Enable PROXY protocol in the nginx `stream` block and list the balancer in `artemis.version-control.ssh-proxy-protocol.trusted-sources` on every localvc node; the Docker Compose files in this repository already do both. See [Build Agent Authentication](/admin/production-setup/security#build-agent-authentication) for this and for restricting which networks build agents may connect from.
614
609
615
610
4. Configuration related to the execution of build jobs:
0 commit comments