Hi all,
I can list active contracts for users but I am getting 403 errors when trying to list active contracts for a provider. Could somebody check my token and request for me?
message: 'Request failed with HTTP status code 403\n' +
'Response body: {"code":"NA","cause":"A security-sensitive error has been received","correlationId":"2f2e9919c18d434fbbd03abb0a5801e8","traceId":"2f2e9919c18d434fbbd03abb0a5801e8","context":{},"resources":[],"errorCategory":-1,"grpcCodeValue":7,"retryInfo":null,"definiteAnswer":null}',
Decoded token payload: {
exp: 1749708419,
iat: 1749708119,
jti: 'e4b7b1b9-ca78-4856-ac39-97713de5a15d',
iss: 'http://keycloak.localhost:8082/realms/AppProvider',
aud: [ 'https://canton.network.global', 'account' ],
sub: 'c87743ab-80e0-4b83-935a-4c0582226691',
typ: 'Bearer',
azp: 'app-provider-validator',
acr: '1',
'allowed-origins': [ '/*' ],
realm_access: {
roles: [
'offline_access',
'default-roles-quickstart',
'uma_authorization'
]
},
resource_access: { account: { roles: [Array] } },
scope: 'email profile',
clientHost: '192.168.65.1',
email_verified: false,
preferred_username: 'service-account-app-provider-validator',
clientAddress: '192.168.65.1',
client_id: 'app-provider-validator'
}
Token verified successfully
const response = await fetch(`http://localhost:37575/v2/state/active-contracts`, {
method: "POST",
headers: {
Authorization: `Bearer ${token}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
filter: {
filtersByParty: {
[providerPartyId]: {},
},
filtersForAnyParty: {
cumulative: [
{
identifierFilter: {
WildcardFilter: {
value: {
includeCreatedEventBlob: true,
},
},
},
},
],
},
},
verbose: true,
activeAtOffset: 0,
eventFormat: null,
}),
});