OpenBanking-Brasil / specs-seguranca

Documentação das especificações do GT de Segurança do Open Banking Brasil. As especificações ainda estão em versão draft e não devem ser utilizadas para implementação.
67 stars 45 forks source link

Fix/dynamic client registration 1 id3 #403

Closed GustavoBertagnaAccenture closed 1 year ago

GustavoBertagnaAccenture commented 1 year ago

Foi criado a seção 9.4 para os seguintes documentos:

open-banking-brasil-dynamic-client-registration-1_ID3-ptbr.html open-banking-brasil-dynamic-client-registration-1_ID3-ptbr.md open-banking-brasil-dynamic-client-registration-1_ID3.html open-banking-brasil-dynamic-client-registration-1_ID3.md

A seção 9.4 adicionada é:

9.4. Validação de certificados de assinatura • O diretório realiza a validação do certificado de assinatura através da função cert rescan, a cada hora. • As instituições devem assegurar que o processo de validação é realizado. • Cada instituição deve ter alternativa de contingência em caso de indisponibilidade do serviço de validação realizado pelo diretório. • Ao identificar que o certificado de assinatura não é válido pois, está com status revogado de acordo com o OCSP/CRL da CA emissora, ou está inativo no cadastro do diretório, o conjunto de chaves públicas é movido para o repositório de chaves inativas (Inactive Keystore). • É recomendado que o processo de validação inclua: o Validação da assinatura da mensagem do Transmissor de Dados, a ser feita pelo Receptor de Dados  Validar se a mensagem está assinada conforme o Message Signature Guidelines, incluindo se o iss é igual ao organisation_id do servidor que emitiu a mensagem.  Buscar a declaração iss do JWT e gerar URI do JWKS publicado no diretório, para consulta.  Certificar se o kid do cabeçalho JWT da mensagem está presente no diretório JWKS.  Validar se a chave privada para o kid correspondente é capaz de validar a assinatura da mensagem. o Validação da assinatura da mensagem do Receptor de Dados, a ser feita pelo Transmissor de Dados  Validar se a mensagem está assinada conforme o Message Signature Guidelines.  Obter o org_jwks_uri que foi apresentado no SSA pelo cliente no momento do DCR.  Certificar se o kid do cabeçalho JWT da mensagem está presente no diretório JWKS.  Validar se a chave privada para o kid correspondente é capaz de validar a assinatura da mensagem.

9.4. Signature certificates validation • The directory uses cert rescan function hourly to validation process. • The organization shall ensure that the validation process was completed. • Each organization must have a continuity plan in case of unavailability validation service. • If the signature certificate is not valid because it has a revoked status according to the CA’s OCSP/CRL issuer, or is inactive in the directory register, the set of public keys is moved to the inactive key storage. • The validation process should include: o Resource server (Data Transmitter) message signature validation, to be done by the Client (Data Receiver)  Validate that the message was signed in line with what’s defined on the Message Signature Guidelines, including that the iss is equal to the organisation_id of the server that issued the message.  Fetch the “iss” claim from the JWT and build the directory application JWKS uri for that specific server.  Make sure that the kid present on the message JWT header is present on the directory JWKS.  Validate that the private key for the corresponding kid is able to validate the message signature. o Client (Data Receiver) message signature validation, to be done by the Resource Server  Validate how the message was signed in line with what’s defined on the Message Signature Guidelines.  Obtain the org_jwks_uri which was presented on the SSA by the client on the moment of the registration (DCR)  Make sure that the kid present on the message JWT header is present on the directory JWKS.  Validate that the private key for the corresponding kid is able to validate the message signature.