Adding documentation for invoker
[nonrtric/plt/sme.git] / invoker / docs / Obtain Access Token.svg
diff --git a/invoker/docs/Obtain Access Token.svg b/invoker/docs/Obtain Access Token.svg
new file mode 100644 (file)
index 0000000..09eabbb
--- /dev/null
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" contentStyleType="text/css" height="658px" preserveAspectRatio="none" style="width:851px;height:658px;background:#FFFFFF;" version="1.1" viewBox="0 0 851 658" width="851px" zoomAndPan="magnify"><defs/><g><rect fill="#DDDDDD" height="646.9844" style="stroke:#181818;stroke-width:0.5;" width="634" x="121" y="6"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="104" x="386" y="18.0669">CAPIF Internal</text><rect fill="#ADD8E6" height="458.3906" style="stroke:#000000;stroke-width:1.5;" width="835" x="10" y="98.2969"/><rect fill="#FA8072" height="148.7969" style="stroke:#000000;stroke-width:1.5;" width="559" x="202" y="298.3594"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="67" x2="67" y1="81.2969" y2="573.6875"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="163" x2="163" y1="81.2969" y2="573.6875"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="270" x2="270" y1="81.2969" y2="573.6875"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="430" x2="430" y1="81.2969" y2="573.6875"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="553" x2="553" y1="81.2969" y2="573.6875"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="685" x2="685" y1="81.2969" y2="573.6875"/><line style="stroke:#181818;stroke-width:0.5;stroke-dasharray:5.0,5.0;" x1="798" x2="798" y1="81.2969" y2="573.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="89" x="20" y="77.9951">InvokerClient</text><ellipse cx="67.5" cy="13.5" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M67.5,21.5 L67.5,48.5 M54.5,29.5 L80.5,29.5 M67.5,48.5 L54.5,63.5 M67.5,48.5 L80.5,63.5 " fill="none" style="stroke:#181818;stroke-width:0.5;"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="89" x="20" y="585.6826">InvokerClient</text><ellipse cx="67.5" cy="597.4844" fill="#E2E2F0" rx="8" ry="8" style="stroke:#181818;stroke-width:0.5;"/><path d="M67.5,605.4844 L67.5,632.4844 M54.5,613.4844 L80.5,613.4844 M67.5,632.4844 L54.5,647.4844 M67.5,632.4844 L80.5,647.4844 " fill="none" style="stroke:#181818;stroke-width:0.5;"/><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="77" x="125" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="132" y="69.9951">capifcore</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="77" x="125" y="572.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="63" x="132" y="592.6826">capifcore</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="117" x="212" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="103" x="219" y="69.9951">securityservice</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="117" x="212" y="572.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="103" x="219" y="592.6826">securityservice</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="113" x="374" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="99" x="381" y="69.9951">invokerservice</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="113" x="374" y="572.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="99" x="381" y="592.6826">invokerservice</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="113" x="497" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="99" x="504" y="69.9951">publishservice</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="113" x="497" y="572.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="99" x="504" y="592.6826">publishservice</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="131" x="620" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="117" x="627" y="69.9951">providermanager</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="131" x="620" y="572.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="117" x="627" y="592.6826">providermanager</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="74" x="761" y="50"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="768" y="69.9951">keycloak</text><rect fill="#E2E2F0" height="30.2969" rx="2.5" ry="2.5" style="stroke:#181818;stroke-width:0.5;" width="74" x="761" y="572.6875"/><text fill="#000000" font-family="sans-serif" font-size="14" lengthAdjust="spacing" textLength="60" x="768" y="592.6826">keycloak</text><path d="M10,98.2969 L74,98.2969 L74,105.4297 L64,115.4297 L10,115.4297 L10,98.2969 " fill="#ADD8E6" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="458.3906" style="stroke:#000000;stroke-width:1.5;" width="835" x="10" y="98.2969"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="19" x="25" y="111.3638">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="113" x="89" y="110.5073">[Security Service]</text><polygon fill="#181818" points="258.5,162.8281,268.5,166.8281,258.5,170.8281,262.5,166.8281" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="67.5" x2="264.5" y1="166.8281" y2="166.8281"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="92" x="74.5" y="131.4966">Request token</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="95" x="78.5" y="146.6294">for service with</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="107" x="78.5" y="161.7622">AccessTokenReq</text><polygon fill="#181818" points="418.5,191.9609,428.5,195.9609,418.5,199.9609,422.5,195.9609" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="270.5" x2="424.5" y1="195.9609" y2="195.9609"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="136" x="277.5" y="190.895">Is invoker registered?</text><polygon fill="#181818" points="281.5,221.0938,271.5,225.0938,281.5,229.0938,277.5,225.0938" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="275.5" x2="429.5" y1="225.0938" y2="225.0938"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="17" x="287.5" y="220.0278">Ok</text><polygon fill="#181818" points="786,250.2266,796,254.2266,786,258.2266,790,254.2266" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="270.5" x2="792" y1="254.2266" y2="254.2266"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="94" x="277.5" y="249.1606">Is secret valid?</text><polygon fill="#181818" points="281.5,279.3594,271.5,283.3594,281.5,287.3594,277.5,283.3594" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="275.5" x2="797" y1="283.3594" y2="283.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="17" x="287.5" y="278.2935">Ok</text><path d="M202,298.3594 L266,298.3594 L266,305.4922 L256,315.4922 L202,315.4922 L202,298.3594 " fill="#FA8072" style="stroke:#000000;stroke-width:1.5;"/><rect fill="none" height="148.7969" style="stroke:#000000;stroke-width:1.5;" width="559" x="202" y="298.3594"/><text fill="#000000" font-family="sans-serif" font-size="13" font-weight="bold" lengthAdjust="spacing" textLength="19" x="217" y="311.4263">alt</text><text fill="#000000" font-family="sans-serif" font-size="11" font-weight="bold" lengthAdjust="spacing" textLength="91" x="281" y="310.5698">[Check scope]</text><polygon fill="#181818" points="673.5,347.7578,683.5,351.7578,673.5,355.7578,677.5,351.7578" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="270.5" x2="679.5" y1="351.7578" y2="351.7578"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="127" x="277.5" y="331.5591">Is function providing</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="121" x="281.5" y="346.6919">service registered?</text><polygon fill="#181818" points="281.5,376.8906,271.5,380.8906,281.5,384.8906,277.5,380.8906" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="275.5" x2="684.5" y1="380.8906" y2="380.8906"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="17" x="287.5" y="375.8247">Ok</text><polygon fill="#181818" points="541.5,406.0234,551.5,410.0234,541.5,414.0234,545.5,410.0234" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="270.5" x2="547.5" y1="410.0234" y2="410.0234"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="131" x="277.5" y="404.9575">Is service published?</text><polygon fill="#181818" points="281.5,435.1563,271.5,439.1563,281.5,443.1563,277.5,439.1563" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="275.5" x2="552.5" y1="439.1563" y2="439.1563"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="17" x="287.5" y="434.0903">Ok</text><polygon fill="#181818" points="786,471.2891,796,475.2891,786,479.2891,790,475.2891" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="270.5" x2="792" y1="475.2891" y2="475.2891"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="61" x="277.5" y="470.2231">get token</text><polygon fill="#181818" points="281.5,500.4219,271.5,504.4219,281.5,508.4219,277.5,504.4219" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="275.5" x2="797" y1="504.4219" y2="504.4219"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="61" x="287.5" y="499.356">JWT token</text><polygon fill="#181818" points="78.5,544.6875,68.5,548.6875,78.5,552.6875,74.5,548.6875" style="stroke:#181818;stroke-width:1.0;"/><line style="stroke:#181818;stroke-width:1.0;" x1="72.5" x2="269.5" y1="548.6875" y2="548.6875"/><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="106" x="84.5" y="528.4888">AccessTokenRsp</text><text fill="#000000" font-family="sans-serif" font-size="13" lengthAdjust="spacing" textLength="65" x="88.5" y="543.6216">with token</text><!--MD5=[cf0e5c23bdd9f8d1a05ebf4c879ed7c6]
+@startuml Obtain Access Token\r
+actor InvokerClient\r
+\r
+box "CAPIF Internal"\r
+participant capifcore\r
+participant securityservice\r
+participant invokerservice\r
+participant publishservice\r
+participant providermanager\r
+end box\r
+participant keycloak\r
+\r
+alt#LightBlue #LightBlue Security Service\r
+        InvokerClient->securityservice: Request token\n for service with\n AccessTokenReq\r
+        securityservice->invokerservice: Is invoker registered?\r
+        invokerservice->securityservice: Ok\r
+        securityservice->keycloak: Is secret valid?\r
+        keycloak->securityservice: Ok\r
+        alt#Salmon #Salmon Check scope\r
+            securityservice->providermanager: Is function providing\n service registered?\r
+            providermanager->securityservice: Ok\r
+            securityservice->publishservice: Is service published?\r
+            publishservice->securityservice: Ok\r
+        end\r
+        securityservice->keycloak: get token\r
+        keycloak->securityservice: JWT token\r
+        securityservice->InvokerClient: AccessTokenRsp\n with token\r
+    end\r
+\r
+@enduml\r
+
+PlantUML version 1.2022.7(Mon Aug 22 19:01:30 CEST 2022)
+(GPL source distribution)
+Java Runtime: OpenJDK Runtime Environment
+JVM: OpenJDK 64-Bit Server VM
+Default Encoding: UTF-8
+Language: en
+Country: null
+--></g></svg>
\ No newline at end of file