48
48
< meta property ="og:type " content ="article " />
49
49
< meta property ="og:url " content ="https://microcks.io/documentation/automating/service-account/ " /> < meta property ="article:section " content ="documentation " />
50
50
< meta property ="article:published_time " content ="2019-09-01T00:00:00+00:00 " />
51
- < meta property ="article:modified_time " content ="2020-09-14T00 :00:00+00:00 " />
51
+ < meta property ="article:modified_time " content ="2023-07-17T00 :00:00+00:00 " />
52
52
53
53
< meta itemprop ="name " content ="Microcks Service Accounts ">
54
54
< meta itemprop ="description " content ="Microcks Service Accounts Introduction Microcks is using OpenId Connect and OAuth 2.0 bearer tokens to secure its frontend and API access. While this is very convenient for interactive users, it may be unpracticable for machine-to-machine authentication when you want to interact with Microcks from a robot, CI/CD pipeline or simple CLI tool. For that, we decided to implement the simple OAuth 2.0 Client Credentials Grant in addition of other grants. This authentication is implemented using Service Accounts clients defined into the Realm configuration in Keycloak. "> < meta itemprop ="datePublished " content ="2019-09-01T00:00:00+00:00 " />
55
- < meta itemprop ="dateModified " content ="2020-09-14T00 :00:00+00:00 " />
55
+ < meta itemprop ="dateModified " content ="2023-07-17T00 :00:00+00:00 " />
56
56
< meta itemprop ="wordCount " content ="583 ">
57
57
< meta itemprop ="keywords " content ="" /> < meta name ="twitter:card " content ="summary "/>
58
58
< meta name ="twitter:title " content ="Microcks Service Accounts "/>
@@ -269,7 +269,7 @@ <h3 id="inspecting-default-service-account">Inspecting default Service Account</
269
269
< span class ="o "> {</ span >
270
270
< span class ="s2 "> "realm"</ span > : < span class ="s2 "> "microcks"</ span > ,
271
271
< span class ="s2 "> "resource"</ span > : < span class ="s2 "> "microcks-app-js"</ span > ,
272
- < span class ="s2 "> "auth-server-url"</ span > : < span class ="s2 "> "https://keycloak.microcks.example.com/auth "</ span > ,
272
+ < span class ="s2 "> "auth-server-url"</ span > : < span class ="s2 "> "https://keycloak.microcks.example.com"</ span > ,
273
273
< span class ="s2 "> "ssl-required"</ span > : < span class ="s2 "> "external"</ span > ,
274
274
< span class ="s2 "> "public-client"</ span > : < span class ="nb "> true</ span >
275
275
< span class ="o "> }</ span >
@@ -291,7 +291,7 @@ <h3 id="using-service-account">Using Service Account</h3>
291
291
292
292
< span class ="c1 "> # then you issue a POST command to authenticate and retrieve an access_token from Keycloak</ span >
293
293
< span class ="c1 "> # the grant_type used is client_credentials</ span >
294
- $ curl -X POST https://keycloak.microcks.example.com/auth/ realms/microcks/protocol/openid-connect/token -H < span class ="s1 "> 'Content-Type: application/x-www-form-urlencoded'</ span > -H < span class ="s1 "> 'Accept: application/json'</ span > -H < span class ="s1 "> 'Authorization: Basic bWljcm9ja3Mtc2VydmljZWFjY291bnQ6YWI1NGQzMjktZTQzNS00MWFlLWE5MDAtZWM2YjNmZTE1YzU0Cg='</ span > -d < span class ="s1 "> 'grant_type=client_credentials'</ span > -k -s < span class ="p "> |</ span > jq .
294
+ $ curl -X POST https://keycloak.microcks.example.com/realms/microcks/protocol/openid-connect/token -H < span class ="s1 "> 'Content-Type: application/x-www-form-urlencoded'</ span > -H < span class ="s1 "> 'Accept: application/json'</ span > -H < span class ="s1 "> 'Authorization: Basic bWljcm9ja3Mtc2VydmljZWFjY291bnQ6YWI1NGQzMjktZTQzNS00MWFlLWE5MDAtZWM2YjNmZTE1YzU0Cg='</ span > -d < span class ="s1 "> 'grant_type=client_credentials'</ span > -k -s < span class ="p "> |</ span > jq .
295
295
< span class ="o "> {</ span >
296
296
< span class ="s2 "> "access_token"</ span > : < span class ="s2 "> "eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJFdlRzbVZhQ3dya3p6LTBlYTJhVDBmTHV1dzJfal9zNnNjOW9zVUN3Q1JnIn0.eyJleHAiOjE2MDAwNzc5NDYsImlhdCI6MTYwMDA3NzY0NiwianRpIjoiNjNjZGRjM2YtODBmMi00NmM0LThlOTQtM2RjNjg5MjU1NmE3IiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDo4MTgwL2F1dGgvcmVhbG1zL21pY3JvY2tzIiwiYXVkIjpbIm1pY3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
297
297
< span class ="s2 "> "expires_in"</ span > : 300,
@@ -615,7 +615,7 @@ <h6 class="f4 dark-gray mb2">
615
615
< span class ="nl3 child "> < svg class ="grow " fill ="" height ="14px " viewBox ="0 0 24 24 " width ="14px " xmlns ="http://www.w3.org/2000/svg "> < path d ="M0 0h24v24H0z " fill ="none "/> < path d ="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z "/> </ svg >
616
616
</ span >
617
617
“Microcks Service Accounts”
618
- </ a > was last updated: September 14, 2020
618
+ </ a > was last updated: July 17, 2023
619
619
</ h6 >
620
620
621
621
< a href ="https://github.com/microcks/microcks.io/edit/master/content/documentation/automating/service-account.md " class ="
0 commit comments