[NEWS] Autoryzacja - 30 grudnia 2024 wprowadzimy zmiany w mechanizmie PKCE / Authorization - on December 30, 2024, we will introduce changes in the PKCE mechanism
- Lenguaje dominante
- Sin datos de lenguaje
- Estrellas
- 244
- Forks
- 40
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Mechanizm [PKCE](https://tools.ietf.org/html/rfc7636) (Proof Key for Code Exchange), którego możesz użyć podczas autoryzacji użytkownika, pozwala zabezpieczyć aplikację przed wykorzystaniem kodu autoryzacyjnego (authorization code) przez złośliwe oprogramowanie.
**30 grudnia** wprowadzimy zmiany, które wpłyną na działanie aplikacji, które **nie szyfrują** (code_challenge_method=plain) kodu generowanego na potrzeby PKCE (code_verifier).
**Jak mechanizm PKCE działa obecnie?**
Aktualnie w procesie autoryzacji możesz skorzystać z jednego z dwóch sposobów szyfrowania kodu na potrzeby mechanizmu PKCE:
- **S256** - oznacza, że kod (“code_challenge”) będzie zahashowanym (algorytmem SHA-256) weryfikatorem (“code_verifier”):
code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier)))
- **plain** - oznacza, że kod będzie równy wartości weryfikatora:
code_challenge = code_verifier
Więcej na temat obsługi PKCE znajdziesz [w naszym poradniku](https://developer.allegro.pl/tutorials/uwierzytelnianie-i-autoryzacja-zlq9e75GdIR#autoryzacja-uzytkownika).
**Jak mechanizm PKCE będzie działać po zmianach?**
Przestaniemy wspierać “code_challenge_method=plain”, co oznacza, że aplikacja zawsze będzie musiała szyfrować “code_verifier” w ramach “code_challenge_method=S256”. Dla requestów z “code_challenge_method=plain” zaczniemy zwracać odpowiedź **400 Bad Request**.
**Dlaczego wprowadzamy zmianę?**
Ze względu na nowy wymóg bezpieczeństwa po stronie OAuth związanym z PKCE, który mówi o tym, że jeśli aplikacja korzysta z PKCE, nie może w procesie autoryzacji ujawniać wartości weryfikatora (“code_verifier”)
[Najnowsze standardy](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics#name-authorization-code-grant) zalecają stosowanie PKCE również jako rozszerzenia podstawowego procesu autoryzacji dla wszystkich aplikacji, które korzystają z autoryzacji typu [authorization code](https://developer.allegro.pl/tutorials/uwierzytelnianie-i-autoryzacja-zlq9e75GdIR#authorization-code-flow).
-----
[PKCE](https://tools.ietf.org/html/rfc7636) (Proof Key for Code Exchange) mechanism which can be used during the user authorization process, allows you to protect your application against the use of authorization_code by malicious software.
**On December 30,** we will introduce changes that will affect applications that **do not encrypt** (code_challenge_method=plain) code for the needs of the PKCE (code_verifier).
**How does the PKCE mechanism work currently?**
You can use one of two methods of encrypting code for the needs of the PKCE during authorization:
- **S256** - means that the “code_challenge” will be encrypted (with SHA-256 algorithm) “code_verifier”:
code_challenge = BASE64URL-ENCODE(SHA256(ASCII(code_verifier)))
- **plain** - means that the code_challenge value will equal the code_verifier value.
code_challenge = code_verifier
You can read more about PKCE in [our tutorial](https://developer.allegro.pl/tutorials/authentication-and-authorization-m09BlVyo7iY#user-authorization).
**How will the PKCE mechanism work after the changes?**
We will stop supporting the “code_challenge_method=plain”, which means that the application will always have to encrypt “code_verifier” within “code_challenge_method=S25”’. For requests with “code_challenge_method=plain,” we will start returning a **400 Bad Request** response.
**Why are we making the change?**
Due to a new security requirement on the OAuth side related to PKCE which states that if an application uses PKCE, it cannot expose the verifier value (‘code_verifier’) in the authorization process.
[The latest standards](https://datatracker.ietf.org/doc/html/draft-ietf-oauth-security-topics#name-authorization-code-grant) recommend the usage of PKCE also as an enhancement to the basic [authorization code flow](https://developer.allegro.pl/tutorials/uwierzytelnianie-i-autoryzacja-zlq9e75GdIR#authorization-code-flow).
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Evaluación
Este issue todavía no se ha evaluado.