common.tsp.bankconfig

io.token.proto.common.tsp.bankconfig /common/src/main/proto/tsp/bankconfig.proto


syntax = "proto3";
package io.token.proto.common.tsp.bankconfig;
option java_outer_classname = "BankConfigProtos";
option csharp_namespace = "Tokenio.Proto.Common.Tsp.BankConfigProtos";

import "extensions/field.proto";

message BankConfig {
  oneof config {
    UKOpenBankingStandard uk_open_banking_standard = 1;
    NextGenPsd2Standard next_gen_psd2_standard = 2;
    PolishApiStandard polish_api_standard = 3;
    ProviderSampleStandard provider_sample_standard = 4;
    StetPsd2Standard stet_psd2_standard = 5;
    StarlingApiStandard starling_api_standard = 6;
    CzechPsd2Standard czech_psd2_standard = 7;
    BudapestPsd2Standard budapest_psd2_standard = 8;
  }

  message ProviderSampleStandard {
    string client_id = 1;
    string client_secret = 2;
    string jwt_signing_key_id = 3;
    string jwt_signing_algorithm = 4; // RS256, PS256, etc
    string signing_key_id = 5;
    string transport_key_id = 6;
  }

  message UKOpenBankingStandard {
    string organisation_id = 1;
    string software_statement_id = 2;
    string authentication_type = 3; // client-secret-basic, client-secret-post, tls-client-auth, private-key-jwt
    string client_id = 4;
    string client_secret = 5 [(io.token.proto.extensions.field.redact) = true]; // optional, depending on the authentication_type
    string jwt_signing_key_id = 6; // created by Open Banking Directory
    string jwt_signing_algorithm = 7; // RS256, PS256, etc
    string signing_key_id = 8;
    string transport_key_id = 9;
    bool is_eidas = 10;
  }

  message NextGenPsd2Standard {
    string x_api_key_ais = 1;
    string x_api_key_pis = 2;
    string client_id = 3;
    string client_secret = 4;
    string psu_corporate_id_type = 5;
    string psu_id_type = 6;
    string jwt_signing_key_id = 7;
    string jwt_signing_algorithm = 8;
    string qseal_certificate = 9 [deprecated = true]; // TODO(PLT-783): remove
    string qwac_certificate = 10 [deprecated = true]; // TODO(PLT-783): remove
    string signing_key_id = 11;
    string transport_key_id = 12;
  }

  message StetPsd2Standard {
    string client_id = 1;
    string client_secret = 2;
    string jwt_signing_key_id = 3;
    string jwt_signing_algorithm = 4;
    string signing_key_id = 5;
    string transport_key_id = 6;
  }

  message PolishApiStandard {
    string client_id = 1;
    string client_secret = 2;
    string signing_key_id = 3;
    string transport_key_id = 4;
    string jwt_signing_key_id = 5;
    string x5u = 6; // url to return the pem format of the tpp certificate
    string x5c = 7 [deprecated = true]; // certificate chain for tpp jws certificate, TODO(PLT-783): remove
    string x5t = 8 [deprecated = true]; // certificate thumbprint, TODO(PLT-783): remove
    string kid = 9 [deprecated = true]; // TODO(PLT-783): remove
    string tpp_id = 10;
  }

  message StarlingApiStandard {
    string ais_client_id = 1;
    string ais_client_secret = 2;
    string pis_client_id = 3;
    string pis_client_secret = 4;
    string jwt_signing_key_id = 5;
    string signing_key_id = 6;
  }

  message CzechPsd2Standard {
    string x_api_key = 1;
    string client_id = 2;
    string client_secret = 3;
    string jwt_signing_key_id = 4;
    string jwt_signing_algorithm = 5;
    string qseal_certificate = 6 [deprecated = true]; // TODO(PLT-783): remove
    string signing_key_id = 7;
    string transport_key_id = 8;
  }

  message BudapestPsd2Standard {
    string x_api_key_ais = 1;
    string x_api_key_pis = 2;
    string client_id = 3;
    string jwt_signing_key_id = 4;
    string jwt_signing_algorithm = 5;
    string qseal_certificate = 6 [deprecated = true];
    string qwac_certificate = 7 [deprecated = true];
    string signing_key_id = 8;
    string transport_key_id = 9;
  }
}

message RegistrationPayload {
  oneof payload {
    UKOpenBankingStandard uk_open_banking_standard = 1;
    NextGenPsd2Standard next_gen_psd2_standard = 2;
    StetPsd2Standard stet_psd2_standard = 3;
  }

  message UKOpenBankingStandard {
    string ssa = 1;
    string signing_key_id = 2;
    string transport_key_id = 3;
    string jwt_signing_key_id = 4; // only required when there are multiple signing keys in the
                                   // software statement
  }

  message NextGenPsd2Standard {
    string transport_key_id = 1;
    string signing_key_id = 2;
    repeated string callback_urls = 3;
    string contact_email = 4;
    string app_name = 5;
    string app_description = 6;
  }

  message StetPsd2Standard {
    string transport_key_id = 1;
    string signing_key_id = 2;
    repeated string callback_urls = 3;
    repeated string contacts = 4;
    string app_name = 5;
    string app_description = 6;
    string scope = 7;
    string tpp_legal_id = 8;
  }
}