wso2 / product-is

Welcome to the WSO2 Identity Server source code! For info on working with the WSO2 Identity Server repository and contributing code, click the link below.
http://wso2.github.io/
Apache License 2.0
748 stars 729 forks source link

Can not update Google Outbound provisioning configurations via Console #19049

Closed UdeshAthukorala closed 10 months ago

UdeshAthukorala commented 10 months ago

Describe the issue: Can not update Google Outbound provisioning configurations via Console and following error getting printed in the backend.

  ERROR {org.wso2.carbon.identity.api.server.idp.v1.core.ServerIdpManagementService} - errorCode: IDP-65034 | message: Error occurred while updating Identity Provider information  for tenant -1234

How to reproduce:

  1. `Configure outbound provisioning according via management console according to the following doc(https://is.docs.wso2.com/en/5.9.0/learn/outbound-provisioning-with-google/)
  2. Then update the created IDP via console.
  3. Update will fail with the above mentioned backend error.

Expected behavior: Outbound provisioning configurations in IDP should work without any issues.

Environment information (Please complete the following information; remove any unnecessary fields) :


Related issues:

UdeshAthukorala commented 10 months ago

When further debugging found that following is the exact error.

org.h2.jdbc.JdbcBatchUpdateException: Value too long for column "PROPERTY_VALUE CHARACTER VARYING(2048)": "'MIIJqwIBAzCCCWQGCSqGSIb3DQEHAaCCCVUEgglRMIIJTTCCBXEGCSqGSIb3DQEHAaCCBWIEggVeMII... (3308)"; SQL statement:
INSERT INTO IDP_PROV_CONFIG_PROPERTY (TENANT_ID, PROVISIONING_CONFIG_ID, PROPERTY_KEY, PROPERTY_VALUE, PROPERTY_BLOB_VALUE, PROPERTY_TYPE, IS_SECRET) VALUES (?, ?, ?, ?, ?, ?, ?) [22001-220]

And also I noticed the following behaviour too.

UdeshAthukorala commented 10 months ago

When creating/updating the IDP via managemnt console, from the SOAP requests we are setting the property type of google_prov_private_key as a BLOB and due to that we are saving it as a BLOB.

But when we creating/updating the IDP via new console, form the API server we didn't set the property type for the google_prov_private_key and due to that we are getting above error Value too long for column "PROPERTY_VALUE CHARACTER VARYING(2048)

So this needs to be fixed from api-server level.