From the curl command the only account that i can create from curl or using python who will be functionnal is an account with "Test_NUMBER" with the password test. Does anyone have any idea?
Original Message:
Sent: 03-24-2023 03:36
From: vianney Maletras
Subject: Pentao Api call from python create user but they can't connect
Thanks for your reply Diana.
I don't think it's the right answer because when i create a user by command line with curl :
-d '{ "userName" : "Test1", "password" : "test" }'
Everything works fine the user are created and can connect.
But if i do it using python (cf. the code in my first post) or by calling curl from python the user are created but can't connect. The password seems correct because when as administrator i update the new user password using the one sent by mail then the user can connect.
Anyway i'll look into the api documentation once more.
ps. the curl code come from here "https://gist.github.com/StevenMMortimer/af77afdb74d0d6925b00"
------------------------------
vianney Maletras
Systems Engineer
interieur.gouv.fr
Original Message:
Sent: 03-23-2023 02:24
From: Diana Stanley
Subject: Pentao Api call from python create user but they can't connect
It is possible that the Pentaho API is requiring users to change their password upon initial login, which is a common security practice. You can verify this by checking the API documentation or contacting the Pentaho support team.
To resolve the issue, you can modify your user creation code to set an initial password for the user that meets the password complexity requirements of the Pentaho system. Additionally, you can inform the users that they may need to change their password upon initial login to comply with the security policies of the Pentaho system.
If the issue persists, you may need to further troubleshoot the Pentaho API and authentication settings to ensure that they are properly configured. ManageMyHealth
------------------------------
Diana Stanley
Chief Financial Officer
Glicks Furniture
Original Message:
Sent: 03-22-2023 04:48
From: vianney Maletras
Subject: Pentao Api call from python create user but they can't connect
Hello,
I'm creating user from a python programm calling th pentao Api. My users are created but when they try to connect the system doesn't allow it until specifically change the password.
Did anyone had the same issue?
Best regards.
the code :
def CreateApiUser(self, userToCreate:User,pentaoAdminUser:User):
self.url=self.baseAddress+"userroledao/createUser?Authorization=Basic MyAuthorizationEncoded"
# A put request to the API
user= { "userName" : userToCreate.nom, "password" :userToCreate.password }
response = requests.put(self.url,json=user,auth=(pentaoAdminUser.nom,pentaoAdminUser.password))
print(response.status_code)
------------------------------
vianney Maletras
Systems Engineer
interieur.gouv.fr
------------------------------