How to register a tenant in PSI 2.1-HF1

How to register a tenant in PSI 2.1-HF1

book

Article ID: KB0070067

calendar_today

Updated On:

Products Versions
TIBCO Product and Service Inventory 2.1.0-HF1

Description

When trying to register a tenant in PSI 2.1-HF1 by sending the below request, as per page 8 of PSI 2.1-HF1 addendum document:
===
{
"tenantId": "TIBCO",
"clientId": "order",
"clientSecret": "order",
"identityProviderType": "POSTGRES",
"supportAlgorithm": "HS256",
"signingKey": "100f4c1f-f333-4c25-bd8c-e4809722b6a7",
"relationalSchema": {
"dataSourceSchema": "userschemall"
"dataSourceURL":
"jdbc:postgresql://localhost:5432/userdbll?currentSchema=userschemall",
"dataSourceUserName": "userll",
"dataSourcePassword": "userll"
}
}
===
Bad request error (code 400) is returned and the registration fails. See below example:  
===
access-control-allow-headers: x-requested-with,authorization 
 access-control-allow-methods: POST,GET 
 access-control-allow-origin: http://10.241.32.84:9091 
 access-control-max-age: 3600 
 cache-control: no-cache,no-store,max-age=0,must-revalidate 
 connection: close 
 content-length: 0 
 date: Fri,30 Aug 2024 08:37:09 GMT 
 expires: 0 
 pragma: no-cache 
 vary: Origin,Access-Control-Request-Method,Access-Control-Request-Headers 
 x-content-type-options: nosniff 
 x-frame-options: DENY 
 x-xss-protection: 1; mode=block 
===

Issue/Introduction

This article explains how to register a tenant in TIBCO Product and Service Inventory 2.1- HF1 set up when postgreSQL database is used.

Environment

ALL

Resolution

To avoid this issue, please use the below request instead of the one mentioned above:  
=== 
{
  "tenantId": "TIBCO",
  "clientId": "order",
  "clientSecret": "order",
  "identityProviderType": "POSTGRES",
  "supportAlgorithm": "HS256",
  "secretKey": "100f4c1f-f333-4c25-bd8c-e4809722b6a7",
  "relationalSchema": {
    "dataSourceURL": "jdbc:postgresql://localhost:5432/userdbll?currentSchema=userschemall",
    "dataSourceUserName": "userll",
    "dataSourcePassword": "userll"
  }
}
===