-
-
Notifications
You must be signed in to change notification settings - Fork 661
fix: update saml_application_sessions col type
#8051
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: update saml_application_sessions col type
#8051
Conversation
COMPARE TO
|
| Name | Diff |
|---|---|
| packages/core/src/middleware/koa-slonik-error-handler.ts | 📈 +940 Bytes |
| packages/core/src/routes/saml-application/anonymous.ts | 📈 +597 Bytes |
| packages/phrases/src/locales/ar/errors/entity.ts | 📈 +84 Bytes |
| packages/phrases/src/locales/de/errors/entity.ts | 📈 +78 Bytes |
| packages/phrases/src/locales/en/errors/entity.ts | 📈 +76 Bytes |
| packages/phrases/src/locales/es/errors/entity.ts | 📈 +83 Bytes |
| packages/phrases/src/locales/fr/errors/entity.ts | 📈 +85 Bytes |
| packages/phrases/src/locales/it/errors/entity.ts | 📈 +81 Bytes |
| packages/phrases/src/locales/ja/errors/entity.ts | 📈 +82 Bytes |
| packages/phrases/src/locales/ko/errors/entity.ts | 📈 +82 Bytes |
| packages/phrases/src/locales/pl-pl/errors/entity.ts | 📈 +79 Bytes |
| packages/phrases/src/locales/pt-br/errors/entity.ts | 📈 +78 Bytes |
| packages/phrases/src/locales/pt-pt/errors/entity.ts | 📈 +78 Bytes |
| packages/phrases/src/locales/ru/errors/entity.ts | 📈 +111 Bytes |
| packages/phrases/src/locales/th/errors/entity.ts | 📈 +133 Bytes |
| packages/phrases/src/locales/tr-tr/errors/entity.ts | 📈 +71 Bytes |
| packages/phrases/src/locales/zh-cn/errors/entity.ts | 📈 +58 Bytes |
| packages/phrases/src/locales/zh-hk/errors/entity.ts | 📈 +58 Bytes |
| packages/phrases/src/locales/zh-tw/errors/entity.ts | 📈 +58 Bytes |
| packages/schemas/alterations/next-1765255453-update-saml-session-relay-state-to-varchar-512.ts | 📈 +1.17 KB |
| packages/schemas/tables/saml_application_sessions.sql | 0 Bytes |
saml_application_sessions relay_state col typesaml_application_sessions relay_state and saml_request_id cols type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses a database schema limitation in the saml_application_sessions table where the relay_state column with a 256-character limit was causing SAML authentication failures for service providers using longer relay state values.
Key Changes:
- Updated
relay_statecolumn type fromvarchar(256)totextto support arbitrary-length relay state values - Added database migration script to alter the column type
- Enhanced error messages in SAML authentication endpoints to provide better debugging context
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| packages/schemas/tables/saml_application_sessions.sql | Updates table schema definition to change relay_state column from varchar(256) to text |
| packages/schemas/alterations/next-1765186571-update-saml-session-relay-state-to-text.ts | Adds migration script to alter the relay_state column type with up/down operations |
| packages/core/src/routes/saml-application/anonymous.ts | Improves error messages in both GET and POST SAML authentication endpoints by including underlying error details |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/schemas/alterations/next-1765186571-update-saml-session-relay-state-to-text.ts
Outdated
Show resolved
Hide resolved
saml_application_sessions relay_state and saml_request_id cols typesaml_application_sessions cols type
saml_application_sessions cols typesaml_application_sessions col type
8d6a373 to
271eb18
Compare
Summary
update
saml_application_sessionsrelay_statecol typePreviously, the relay_state could only accept values with a length of up to 256 characters. However, some service providers have longer values, which would cause errors in the database write queries, thereby blocking the entire SAML authentication process and leading to failure. In this update, we have changed the column type of relay_state to text to support relay_state values of any length.
Will add changeset in later PR.
Testing
N/A
Checklist
.changeset