Skip to content

Commit c4ed508

Browse files
authored
Update service_config.md
Update the doc to give a more detailed and up to date config example with real world values
1 parent b8c1fed commit c4ed508

File tree

1 file changed

+22
-31
lines changed

1 file changed

+22
-31
lines changed

docs/service_config.md

+22-31
Original file line numberDiff line numberDiff line change
@@ -23,47 +23,38 @@ Which will produce output like the following:
2323
+----------------+-------------------+----------------+-------------------------------------------------------+
2424
```
2525

26-
For more verbose config details of each service, you can request the output in JSON format instead, with the following command:
26+
To use the configuration with one of our SDKs, you can get a full JSON formatted version with the following command:
2727
```sh
2828
mobile get clientconfig example_client_id --namespace=myproject -o json
2929
```
3030

3131
Which will produce output similar to the following (newlines and indentation have been added for readability):
3232
```
3333
{
34-
"version": "1.0",
35-
"cluster_name": "192.168.64.74:8443",
36-
"namespace": "myproject",
37-
"client_id": "example_client_id",
34+
"version": 1,
35+
"clusterName": "https://192.168.64.86:8443",
36+
"namespace": "config",
37+
"clientId": "myapp-android",
3838
"services": [
3939
{
40-
"id": "fh-sync-server",
41-
"name": "fh-sync-server",
42-
"type": "fh-sync-server",
43-
"url": "https://fh-sync-server-myproject.192.168.64.74.nip.io",
44-
"config": {
45-
"url": "https://fh-sync-server-myproject.192.168.64.74.nip.io"
46-
}
47-
},
48-
{
49-
"id": "keycloak",
40+
"id": "keycloak-myapp-android-public",
5041
"name": "keycloak",
5142
"type": "keycloak",
52-
"url": "https://keycloak-myproject.192.168.64.74.nip.io",
43+
"url": "https://keycloak-config.192.168.64.86.nip.io/auth",
5344
"config": {
54-
"auth-server-url": "https://keycloak-myproject.192.168.64.74.nip.io/auth",
55-
"clientId": "juYAlRlhTyYYmOyszFa",
56-
"realm": "myproject",
57-
"resource": "juYAlRlhTyYYmOyszFa",
58-
"ssl-required": "external",
59-
"url": "https://keycloak-myproject.192.168.64.74.nip.io/auth"
45+
"auth-server-url": "https://keycloak-config.192.168.64.86.nip.io/auth",
46+
"confidential-port": 0,
47+
"public-client": true,
48+
"realm": "config",
49+
"resource": "myapp-android-public",
50+
"ssl-required": "external"
6051
}
6152
},
6253
{
63-
"id": "prometheus",
64-
"name": "prometheus",
65-
"type": "prometheus",
66-
"url": "https://prometheus-myproject.192.168.64.74.nip.io",
54+
"id": "metrics-myapp-android",
55+
"name": "metrics",
56+
"type": "metrics",
57+
"url": "https://aerogear-app-metrics-config.192.168.64.86.nip.io/metrics",
6758
"config": {}
6859
}
6960
]
@@ -74,15 +65,15 @@ Which will produce output similar to the following (newlines and indentation hav
7465
Firstly, the parent object in the JSON output is described below:
7566

7667
#### version
77-
The version of the JSON structure used in this response.
68+
The version of the JSON structure used in this response. If in the future the configuration changes in a non compatible way this version number would become 2 for example.
7869

79-
#### cluster_name
70+
#### clusterName
8071
An identifier of the cluster this config was retrieved from.
8172

8273
#### namespace
8374
The namespace these configs were retrieved from.
8475

85-
#### client_id
76+
#### clientId
8677
The client id of the mobile application using these configs.
8778

8879
#### services
@@ -102,9 +93,9 @@ A human-readable identifier of this service.
10293
A way of categorising services, e.g. Authentication, Storage, etc...
10394

10495
#### url
105-
The URL that this service can be reach at
96+
The canonical URL that this service can be reach at
10697

10798
#### config
10899
The config is a loosely defined object where any extra details specific to a particular service that may be required to make proper use of this service will be stored.
109100

110-
For example, in the KeyCloak service in the snippet above, the config contains the name of the realm, clientID and other details that would be required to make use of KeyCloak from a client.
101+
For example, in the KeyCloak service in the snippet above, the config contains the name of the realm, clientID and other details that would be required to make use of KeyCloak from a client.

0 commit comments

Comments
 (0)