Skip to content
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

test: 给教育大模型的临时PR,不合并到主分支 #973

Draft
wants to merge 26 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
b4aebdf
新增,如果认证系统有该用户但scow没有,直接创建
tongchong Nov 13, 2023
8650fd0
changeset
tongchong Nov 13, 2023
cf2bae9
feat: 添加外部自定义认证系统
Miracle575 Nov 15, 2023
3cd4a70
feat: 添加 changeset
Miracle575 Nov 16, 2023
3dcbf17
fix: test bug
Miracle575 Nov 16, 2023
7f4172a
feat: 调整配置
Miracle575 Nov 16, 2023
93ec329
更新 test
Miracle575 Nov 16, 2023
bcefcf5
兼容性配置
Miracle575 Nov 16, 2023
38fc94e
修改配置
Miracle575 Nov 16, 2023
7766c38
feat: mis portal 添加 AUTH_INTERNAL_URL
Miracle575 Nov 16, 2023
a4a97d5
fix: 修复判断是否添加 auth 服务的错误
Miracle575 Nov 16, 2023
096689d
Merge branch 'feat-cli-auth' into temporary-education
Miracle575 Nov 17, 2023
896f599
feat: 添加 host volume
Miracle575 Nov 17, 2023
3f68610
feat: 不使用代理实现外部认证系统,考虑直接跳转
Miracle575 Nov 18, 2023
945bab0
fix: 修复 callbackUrl 未转义的问题
Miracle575 Nov 25, 2023
85ba947
feat: 添加 changeset 文件
Miracle575 Nov 25, 2023
cb805b1
fix: host 头攻击漏洞
Miracle575 Nov 25, 2023
7b65dcd
fix: nginx error
Miracle575 Nov 25, 2023
e637809
feat: 当 server_name 不为 _ 添加默认 server 块
Miracle575 Nov 25, 2023
ce6cea4
fix: test error
Miracle575 Nov 25, 2023
d13cde3
feat: 修改 changeset 文件并新增文档说明
Miracle575 Nov 25, 2023
298cc88
Merge branch 'fix-security' into temporary-education
Miracle575 Nov 25, 2023
caaf256
Merge branch 'master' into temporary-education
Miracle575 Nov 26, 2023
5a7353a
Merge branch 'master' into temporary-education
Miracle575 Nov 29, 2023
c0992da
feat: 删除登出
Miracle575 Nov 29, 2023
93b27e1
Merge branch 'master' into temporary-education
Miracle575 Feb 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/nine-windows-beg.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@scow/mis-web": patch
---

如果 scow 没有该用户,但认证系统中有,直接在 scow 中创建
8 changes: 8 additions & 0 deletions .changeset/seven-glasses-rest.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
"@scow/gateway": minor
"@scow/cli": minor
"@scow/docs": minor
"@scow/auth": patch
---

修复 scow 存在的 web 安全漏洞
6 changes: 6 additions & 0 deletions .changeset/tame-cows-share.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@scow/gateway": minor
"@scow/cli": minor
---

认证系统支持外部 url
16 changes: 15 additions & 1 deletion apps/mis-web/src/auth/token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,23 @@ export async function validateToken(token: string): Promise<UserInfo | undefined

const client = getClient(UserServiceClient);

const userInfo: GetUserInfoResponse = await asyncClientCall(client, "getUserInfo", {
let userInfo: GetUserInfoResponse = await asyncClientCall(client, "getUserInfo", {
userId: resp.identityId,
});

if (!userInfo) {
await asyncClientCall(client, "addUser", {
name: resp.identityId,
tenantName: "default",
email: resp.identityId + "@scow.com",
identityId: resp.identityId,
});

userInfo = await asyncClientCall(client, "getUserInfo", {
userId: resp.identityId,
});
}

return {
accountAffiliations: userInfo.affiliations,
identityId: resp.identityId,
Expand Down
8 changes: 4 additions & 4 deletions libs/web/src/layouts/base/header/UserIndicator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const HiddenOnSmallScreen = styled.span`
`;

export const UserIndicator: React.FC<Props> = ({
user, logout, userLinks, languageId,
user, userLinks, languageId,
}) => {

return (
Expand Down Expand Up @@ -80,9 +80,9 @@ export const UserIndicator: React.FC<Props> = ({
>{link.text}</Link>,
});
}) : [],
{ key: "logout",
onClick: logout,
label: getCurrentLangLibWebText(languageId, "userIndicatorLogout") },
// { key: "logout",
// onClick: logout,
// label: getCurrentLangLibWebText(languageId, "userIndicatorLogout") },
],
}}
>
Expand Down