Skip to content
This repository was archived by the owner on Jun 10, 2025. It is now read-only.

Commit b459a73

Browse files
committed
Merge branch 'main' of github.com:galasa-dev/galasa.dev into iss2213-test-result-provider
2 parents b83002d + c964aba commit b459a73

30 files changed

+1214
-397
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: npx broken-link-checker -ro --exclude /docs/managers/ --filter-level 3 --host-requests 8 --user-agent Chrome/90 --exclude https://fonts.gstatic.com/ --exclude https://github.com/galasa-dev/extensions/ http://localhost:9000
5555

5656
- name: Upload raw site
57-
uses: actions/upload-artifact@v3
57+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
5858
with:
5959
name: output-dotdev-raw-site
6060
path: public
@@ -72,7 +72,7 @@ jobs:
7272
path: repo
7373

7474
- name: Download raw site
75-
uses: actions/download-artifact@v3
75+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
7676
with:
7777
name: output-dotdev-raw-site
7878
path: site/public
@@ -211,7 +211,7 @@ jobs:
211211
run: npx broken-link-checker -ro --exclude /docs/managers/ --filter-level 3 --host-requests 8 --user-agent Chrome/90 --exclude https://fonts.gstatic.com/ --exclude https://github.com/galasa-dev/extensions/ http://localhost:9000
212212

213213
- name: Upload raw site
214-
uses: actions/upload-artifact@v3
214+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
215215
with:
216216
name: output-local-raw-site
217217
path: public
@@ -220,7 +220,7 @@ jobs:
220220
run: ./.github/scripts/war.sh
221221

222222
- name: Upload WAR
223-
uses: actions/upload-artifact@v3
223+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
224224
with:
225225
name: output-local-war
226226
path: galasa.dev-site.war
@@ -239,7 +239,7 @@ jobs:
239239
uses: actions/checkout@v3
240240

241241
- name: Download WAR
242-
uses: actions/download-artifact@v3
242+
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
243243
with:
244244
name: output-local-war
245245

@@ -261,7 +261,7 @@ jobs:
261261
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
262262

263263
- name: Upload JAR
264-
uses: actions/upload-artifact@v3
264+
uses: actions/upload-artifact@65c4c4a1ddee5b72f698fdd19549f0f0fb45cf08 # v4.6.0
265265
with:
266266
name: output-local-jar
267267
path: package-jar/build/libs/galasa.dev-runnable.jar

.vscode/tasks.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
{
77
"label": "Serve (Development)",
88
"type": "shell",
9-
"command": "npm run develop",
9+
"command": "npm run develop -- --host 0.0.0.0",
1010
"group": {
1111
"kind": "build"
1212
},
@@ -16,7 +16,7 @@
1616
{
1717
"label": "Serve",
1818
"type": "shell",
19-
"command": "npm run build && npm run serve",
19+
"command": "npm run build && npm run serve -- --host 0.0.0.0",
2020
"group": {
2121
"kind": "build"
2222
},

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,11 @@ You can then serve that production build using:
3737
npm run serve
3838
```
3939

40+
Note: If you are using a dev container within vscode, use this instead:
41+
```sh
42+
npm run serve -- --host 0.0.0.0
43+
```
44+
4045
## Contributing
4146

4247
Take a look at the [contribution guidelines](https://github.com/galasa-dev/projectmanagement/blob/main/contributing.md).

src/data/nav.yaml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,20 @@
9494
items:
9595
- title: Ecosystem architecture
9696
path: /docs/ecosystem/architecture
97+
- title: Role based access control
98+
path: /docs/ecosystem/role-based-access
9799
- title: Installing an Ecosystem using Helm
98100
path: /docs/ecosystem/ecosystem-installing-k8s
99101
- title: Configuring authentication
100102
path: /docs/ecosystem/ecosystem-authentication
101103
- title: Configuring an Ecosystem using resource files
102-
path: /docs/ecosystem/cps-yaml
103-
- title: Updating credentials in an Ecosystem
104-
path: /docs/ecosystem/ecosystem-update-creds
104+
path: /docs/ecosystem/resources-yaml
105+
- title: Managing credentials in an Ecosystem
106+
path: /docs/ecosystem/ecosystem-manage-creds
105107
- title: Managing configuration properties
106-
path: /docs/ecosystem/ecosystem-manage-cps
108+
path: /docs/ecosystem/ecosystem-manage-cps
109+
- title: Managing Ecosystem encryption keys
110+
path: /docs/ecosystem/ecosystem-managing-encryption-keys
107111
- title: Managing tests in a Galasa Ecosystem
108112
path: /docs/manage-ecosystem
109113
items:
@@ -128,6 +132,8 @@
128132
items:
129133
- title: CICS TS Managers
130134
path: /docs/manager-groups/cics-ts-manager-group
135+
- title: IMS TM Managers
136+
path: /docs/manager-groups/ims-tm-manager-group
131137
- title: Cloud Managers
132138
path: /docs/manager-groups/cloud-manager-group
133139
- title: Communications Managers

src/markdown-pages/docs/cli-command-reference/installing-cli-tool.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,18 @@ The following versions of the Galasa CLI are available to download for different
2525

2626
Complete the following steps to install Galasa for using the command line:
2727

28+
On Mac:
29+
30+
1. On a Mac, the `homebrew` tool can be used to install the `galasactl` tool. Or you can follow the Unix instructions
31+
2. Connect `homebrew` to the 'tap' it can use: `brew tap galasa-dev/tap`
32+
3. Then you have a choice. Either install the latest version fo the `galasactl` tool, or install a specific version.
33+
1. To install the latest version of `galasactl`:
34+
`brew install --no-quarantine galasactl`
35+
2. To install a specific version of `galasactl` (version 0.40.0 for example):
36+
`brew install --no-quarantine galasactl@0.40.0`
37+
Note: You can check to see what versions are available using this:
38+
`brew tap-info galasa-dev/tap --json` and look in the `"cask_tokens"` part of the json file.
39+
2840
On Mac or Unix:
2941

3042
1. Find out the architecture of your machine by typing the command `uname -m` into your terminal.

src/markdown-pages/docs/cli-command-reference/installing-offline.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ Note: The example uses port `8080` but you can use a different port.
3131
docker load -i isolated.tar
3232
```
3333

34-
The following confirmation message is received: _Loaded image: icr.io/galasadev/galasa-distribution:main_.
34+
The following confirmation message is received: _Loaded image: ghcr.io/galasa-dev/galasa-isolated:main_.
3535

3636
2. Run the container by using the following command:
3737
```
38-
docker run -d -p 8080:80 --name galasa icr.io/galasadev/galasa-distribution:main
38+
docker run -d -p 8080:80 --name galasa ghcr.io/galasa-dev/galasa-isolated:main
3939
```
4040

4141
3. Go to `http:\\localhost:8080` to view the running container.

src/markdown-pages/docs/ecosystem/ecosystem-architecture.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,14 @@ The following diagram highlights some of the key components that make up the Gal
6767
| **Kabana** | A dashboard for visualizing Elasticsearch metrics. Data can be explored through queries and drilldown. |
6868

6969
</details>
70+
71+
### Key concepts:
72+
73+
These concepts are relevant when running tests locally, or when submitting tests to a remote Galasa service:
74+
- A **test case** - A piece of test logic which can be compiled or translated into something which is runnable by the Galasa framework. This may be a piece of Java code for example, or a Gherkin test feature.
75+
- A **test run** - Also known as a 'run' - An execution of the testcase which was started at a certain point in time, executed logic steps, and is still running, or has finished with a test status and result. For example: Passed or Failed.
76+
77+
Some concepts are only relevant on a Galasa service:
78+
- A **user** - The authorised person manipulating the Galasa system in some way.
79+
- **Role based access control (RBAC)** - The mechanism where the Galasa service will allow some users to perform any available task, but limit what other users can do. This is to help isolate some system capabilities for safety or for security. Read more about the RBAC in the [role-based access](./ecosystem-role-based-access.md) section.
80+

src/markdown-pages/docs/ecosystem/ecosystem-authentication.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,14 @@ path: "/docs/ecosystem/ecosystem-authentication"
33
title: "Configuring authentication"
44
---
55

6-
Before interacting with a Galasa Ecosystem using the Galasa command line tool (galasactl), you must be authenticated with it. Galasa uses personal access tokens to authenticate users who want to interact with a Galasa Ecosystem provided by the `GALASA_BOOTSTRAP` environment variable or through the `--bootstrap` flag.
6+
Before interacting with a Galasa Ecosystem using the Galasa command line tool (`galasactl`), you must be authenticated with it. Any `galasactl` command which connects to a remote Galasa service needs to know the address of that service. A URL can be configured in the `GALASA_BOOTSTRAP` environment variable or it can be set on a per-command basis using the `--bootstrap` flag.
77

8+
Once the `galasactl` tool knows which Galasa service to contact, it needs to be configured to be able to authenticate to that service.
9+
To do that, the Galasa Web UI must be used to allocate a personal access token, which can be passed to the `galasactl` to be used.
810

9-
Personal access tokens are stored in the `GALASA_TOKEN` property in the `galasactl.properties` file in your Galasa home folder. The `galasactl.properties` file is created when you run the `galasa local init` command. Setting the `GALASA_TOKEN` property in this file with a valid token value allows the galasactl tool to access and communicate with an Ecosystem on behalf of the user.
11+
A personal access tokens is stored in the `GALASA_TOKEN` property in the `galasactl.properties` file in your Galasa home folder, or in the `GALASA_TOKEN` environment variable. The `galasactl.properties` file is created when you run the `galasa local init` command. Setting the `GALASA_TOKEN` property in this file with a valid token value allows the galasactl tool to access and communicate with an Ecosystem on behalf of the user.
1012

11-
12-
If you have [installed your Galasa Ecosystem](../ecosystem/ecosystem-installing-k8s) by using the Galasa Ecosystem Helm chart that is provided with Galasa, you will have access to the Galasa Web UI. To get a value for the `GALASA_TOKEN` property, log into the Galasa Web UI and request a personal access token which can be copied into the `GALASA_TOKEN` property. The instructions on how to do this are displayed in a dialog box in the Galasa Web UI. You can choose to set the token as an environmental variable but the value would not persist across terminals, so is only valid for that session.
13+
If you have [installed your Galasa Ecosystem](../ecosystem/ecosystem-installing-k8s) by using the Galasa Ecosystem Helm chart that is provided with Galasa, you will have access to the Galasa Web UI. To get a value for the `GALASA_TOKEN` property, log into the Galasa Web UI and request a personal access token (using the 'My Settings' page) which can be copied into the `GALASA_TOKEN` property. The instructions on how to do this are displayed in a dialog box in the Galasa Web UI. You can choose to set the token as an environmental variable but the value would not persist across terminals, so is only valid for that session.
1314

1415
## Authentication architecture
1516

@@ -18,10 +19,13 @@ The following diagram shows the architecture for the authentication process:
1819
![Galasa ecosystem architecture:](ecosystem-cluster-auth.svg)
1920

2021

21-
When a user logs into the Galasa Web UI via their browser, the Web UI contacts the Galasa API server which in turn talks to a Dex server, providing it with the user ID. The Dex server talks to an identity provider, for example GitHub or LDAP, to authenticate that user. If the user is successfully authenticated, the provider returns an access token to the Dex server which sends that token to Galasa API server. The token is then sent to the Galasa Web UI where it is visible to the user. The user can then configure that token into the galasactl command line tool by updating the `GALASA_TOKEN` property in the `galasactl.properties` file. The user can then be authenticated each time the galasactl tool is used to log into a Galasa Ecosystem.
22+
When a user logs into the Galasa Web UI via their browser, the Web UI contacts the Galasa API server which in turn talks to a Dex server, providing it with the user ID. The Dex server talks to an identity provider, for example GitHub or LDAP, to authenticate that user. If the user is successfully authenticated, Dex returns a bearer token to the Galasa API server, which in turn passes the token to the Galasa Web UI. The bearer token is then stored in a cookie by the web browser, to be used in further interactions with the Galasa Web UI until the user logs out of the web application, or the token expires.
23+
24+
Once logged-in to the Web UI, the user can then create a new access token token (using the 'My Settings' page). This provides a secret access token which must be copied from the Web UI panel and made available to the `galasactl` command line tool. The access token can be placed in the `GALASA_TOKEN` property in the `galasactl.properties` file, or the `GALASA_TOKEN` environment variable.
2225

23-
On a successful login, a `bearer-token.json` file is created in the Galasa home directory. This file contains a bearer token that galasactl uses to authenticate requests when communicating with a Galasa Ecosystem. If the bearer token expires, galasactl automatically attempts to re-authenticate with the Galasa Ecosystem using the properties in the `galasactl.properties` file within the Galasa home directory.
26+
The `galasactl` tool will login implicitly when it needs to contact the remote Galasa service. Or the login state can be explicitly controlled using the `galasactl auth login` and `galasactl auth logout` commands.
2427

28+
On a successful login using the `galasactl` tool, the `GALASA_TOKEN` will be used to create a new temporary bearer token, which is stored in the `bearer-tokens` folder in the Galasa home directory. This file contains a bearer token that galasactl uses to authenticate requests when communicating with a Galasa Ecosystem. If the bearer token expires, galasactl automatically attempts to re-authenticate with the Galasa Ecosystem using the configured `GALASA_TOKEN`.
2529

2630

2731
### Logging in to a Galasa Ecosystem using the auth login command
@@ -31,7 +35,7 @@ You can log in to a Galasa Ecosystem explicitly by using the `galasactl auth log
3135

3236
### Logging out of a Galasa Ecosystem using the auth logout command
3337

34-
To log out of a Galasa Ecosystem using galasactl, you can use the `galasactl auth logout` command. If you run a galasactl command that interacts with an Ecosystem while logged out, galasactl will attempt to automatically log in using the properties in your `galasactl.properties` file within your Galasa home directory.
38+
To log out of a Galasa Ecosystem using galasactl, you can use the `galasactl auth logout` command. If you run a galasactl command that interacts with an Ecosystem while logged out, galasactl will attempt to automatically log again in using the configured `GALASA_TOKEN`.
3539

3640

3741
### Listing personal access tokens
@@ -51,6 +55,21 @@ Total:2
5155

5256
The returned token list is sorted in creation date order, with the earliest creation date first. The description information matches the description that is provided by the user when creating a new access token from the Galasa Web UI.
5357

58+
You can also get tokens for a specific user
59+
60+
```
61+
> galasactl auth tokens get --user m.smith@gmail.com
62+
tokenid created(YYYY/MM/DD) user description
63+
09823128318238 2024-02-03 m.smith@gmail.com Ecosystem1 access
64+
65+
Total:1
66+
```
67+
68+
If you are unsure which user id you are currently using, you can find out with this command:
69+
```
70+
> galasactl users get --id me
71+
id: m.smith@gmail.com
72+
```
5473

5574
### Revoking personal access tokens
5675

@@ -59,10 +78,20 @@ If a user moves to a new role, or loses a laptop with their personal access toke
5978
You can retrieve a list of available personal access tokens that have been created, along with their token IDs, by running the `galasactl auth tokens get` command, as described in the previous section.
6079

6180

62-
Run the following command to revoke a personal access token with the token ID `myId`:
81+
Run the following command to revoke a personal access token with the token ID `myId` substituted for the numeric value visible from the `galasactl auth tokens get` command.
82+
83+
```
84+
galasactl auth tokens delete --tokenid {myId}
85+
```
6386

87+
For example:
6488
```
65-
galasactl auth tokens delete --tokenid myId
89+
> galasactl auth tokens get --user m.smith@gmail.com
90+
tokenid created(YYYY/MM/DD) user description
91+
09823128318238 2024-02-03 m.smith@gmail.com Ecosystem1 access
92+
93+
Total: 1
94+
> galasactl auth tokens delete --tokenid 09823128318238
6695
```
6796

6897
*Note:* The `galasactl auth tokens delete` command revokes personal access tokens that a user creates through the Galasa Web UI. When a user runs a CLI command that talks to the Ecosystem, the CLI uses the personal access token to get a JSON Web Token (JWT). A JWT is a separate, temporary token that identifies a user and is used in galasactl commands to talk to the API server. JWTs cannot be revoked, but they do expire, so a user can continue to run CLI commands after revoking their personal access token until their JWT expires. You can remove the JWT that is stored on a user's machine instead of having to wait for the JWT to expire, by running the `galasactl auth logout` command on that machine.

0 commit comments

Comments
 (0)