-
Bug
-
Resolution: Done
-
Medium
-
Guilin Release
-
Orange Openlab (Guilin)
pythonsdk (expe)
In order to upgrade the python-onapsdk, I am working on the update of teh clamp part to support the basic/auth and get rid of the certificate.
I consider the cred vector demo/demo123456!
when I try to connect to Clamp I got a 500, the logs in Clamp seem to indicate that the creds are not available on AAF
logs on the client side
Type "help", "copyright", "credits" or "license" for more information.
>>> from onapsdk.clamp.clamp_element import Clamp
>>> Clamp.set_proxy({ 'http': 'socks5h://127.0.0.1:8085', 'https': 'socks5h://127.0.0.1:8085'})
>>> Clamp.check_policies("MinMax")
[None][Get stocked policies] response code: 500
[None][Get stocked policies] response: GET Policy models FAILED
[None][Get stocked policies] sent header: {'Content-Type': 'application/json', 'Accept': 'application/json', 'Authorization': 'Basic ZGVtbzpkZW1vMTIzNDU2IQ==', 'X-ECOMP-InstanceID': 'onapsdk'}
[None][Get stocked policies] url used: https://clamp.api.simpledemo.onap.org:30258/restservices/clds/v2/policyToscaModels/
[None][Get stocked policies] data sent: None
False
logs on Clamp backend side
2021-01-13 17:44:56.284 [https-jsse-nio-8443-exec-2] INFO org.onap.clamp.flow.log.FlowLogOperation - Exiting
2021-01-13 17:44:56.284 [https-jsse-nio-8443-exec-2] INFO org.apache.camel.processor.interceptor.Tracer - ID-onap-clamp-backend-59d9cc46f6-c5bx6-1610515776662-0-337 >>> (route28) bean://org.onap.clamp.flow.log.FlowLogOperation?method=errorLog%28%29 --> log[GET Policy Models request failed for: ${exception.stacktrace}] <<< Pattern:InOut, BodyType:String, Body:
2021-01-13 17:44:56.285 [https-jsse-nio-8443-exec-2] ERROR route28 - GET Policy Models request failed for: org.onap.clamp.clds.exception.NotAuthorizedException: demo@people.osaaf.org does not have permission: org.onap.clamp.clds.tosca|dev|read
at org.onap.clamp.authorization.AuthorizationController.authorize(AuthorizationController.java:122)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
looks like teh user is not properly declared for clamp in AAF
+ sdesbure