skillhub/server
XiaoSeS dba36ca1b9 fix(auth): bound Feishu userinfo response and stop subject leaking into displayName
Three defects found reviewing this batch against the R1-A2 spec.

Response size limit. The spec's scope line asks for "远程 I/O 超时与响应大小
限制"; only the timeouts were implemented, so a misconfigured or hostile
OAUTH2_FEISHU_BASE_URI could stream an unbounded body into the parser.
Reads at most 64 KB before parsing, mirroring the 10 MB cap the shared
WebClientConfig already applies. Uses InputStream.readNBytes rather than
adding commons-io or guava, neither of which skillhub-auth declares.

Synthesized displayName. Falling back to "feishu-<open_id>" wrote the
external subject into UserAccount.displayName and into
UserActivatedEvent, carrying it somewhere event consumers may log it --
against the R1-A gate that logs must not contain the subject. Now stops
at name -> en_name like the GitHub and GitLab extractors.

Unused mobile attribute. A phone number was extracted into the principal
attributes and read by nothing. It is PII the spec did not ask for and it
widened the redaction surface for free.

Also drops a constructor overload that only passed List.of() through, and
a test that duplicated the blank-subject path.

Signed-off-by: XiaoSeS <87064762+XiaoSeS@users.noreply.github.com>
2026-09-21 10:18:37 +08:00
..
.mvn docs: add Maven mirror config and troubleshooting guide for China developers (#233) 2026-04-07 09:50:07 +08:00
scripts feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00
skillhub-app feat(auth): add Feishu as a public login provider 2026-09-21 10:18:37 +08:00
skillhub-auth fix(auth): bound Feishu userinfo response and stop subject leaking into displayName 2026-09-21 10:18:37 +08:00
skillhub-domain feat(auth): unified identity core with LEGACY/SHADOW/ACTIVE rollout (#874) 2026-09-18 14:34:37 +08:00
skillhub-infra feat(auth): unified identity core with LEGACY/SHADOW/ACTIVE rollout (#874) 2026-09-18 14:34:37 +08:00
skillhub-notification refactor(notification): replace SSE with HTTP polling 2026-09-03 11:38:02 +08:00
skillhub-search feat(suite): publish suites from multi-skill bundles 2026-09-17 11:16:39 +08:00
skillhub-storage fix(storage): disable chunked encoding for Aliyun OSS compatibility 2026-05-06 13:56:55 +08:00
.dockerignore feat(staging): optimize staging build with local Maven packaging 2026-03-14 14:21:06 +08:00
Dockerfile fix(deploy): preserve storage volume ownership 2026-08-29 15:58:55 +08:00
Dockerfile.dev fix(storage): defer S3 bucket verification until first access (#289) 2026-04-12 15:24:09 +08:00
mvnw feat: initialize Maven multi-module project structure 2026-03-11 22:52:04 +08:00
mvnw.cmd feat: initialize Maven multi-module project structure 2026-03-11 22:52:04 +08:00
pom.xml feat(notification): add in-app notifications and harden delivery 2026-03-23 12:31:28 +08:00