how to write data via rest-api at port 3000
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 25/100
- Issue 类型
- 文档
- 描述清晰度
- 需要澄清
- 活跃度
- 停滞
- 技术栈
- javascript
调研方向
从 rest-api-service-confg.json 和 issue 中描述的 POST /api/software 请求开始,然后检查 REST API 身份验证和服务角色的文档或入口点。当受支持的写入身份验证路径和所需的服务角色得到明确记录,并且报告的 401 场景得到处理后,即视为完成。
由索引模型根据 Issue 内容生成。
描述
I am trying to add a new software via localhost:3000, with a problem "401 Unauthorized"
When I use name 'navigator' with read-only, I can get the software data. I tried three accounts and go through the config file within the project, there are only 3 service roles "read-only", "stix-export","collection-manager".
How can I do the post operation? or is there anyother serviceRole with write permission to support 'Post' ?
rest-api-service-confg.json is set as follows:
{
"serviceAuthn": {
"challengeApikey": {
"enable": true,
"serviceAccounts": [
{
"name": "collection-manager",
"apikey": "sample-key",
"serviceRole": "collection-manager"
}
]
},
"basicApikey": {
"enable": true,
"serviceAccounts": [
{
"name": "navigator",
"apikey": "sample-key-1",
"serviceRole": "read-only"
},
{
"name": "apikey-test-service",
"apikey": "sample-key-2",
"serviceRole": "stix-export"
},
{
"name": "collection-manager",
"apikey": "sample-key-2",
"serviceRole": "collection-manager"
}
]
}
}
}
log:
2025-09-19 11:22:16 2025-09-19T03:22:16.647Z [HTTP] GET /api/software 200 90.058 ms - -
2025-09-19 11:22:16 2025-09-19T03:22:16.699Z [HTTP] POST /api/software 401 16.854 ms - 14
2025-09-19 11:22:16 2025-09-19T03:22:16.707Z [HTTP] POST /api/software 401 3.321 ms - 14
2025-09-19 11:22:16 2025-09-19T03:22:16.713Z [HTTP] POST /api/software 401 1.281 ms - 14
- 主要语言
- JavaScript
- 星标
- 56
- 派生
- 18
- 平均合并
- 19 小时 39 分钟
- 30 天内合并 PR
- 7
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
mitre-attack/attack-workbench-rest-api 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 85/100
-
难度 2/5 1-3 小时 新手友好度 86/100
-
难度 2/5 1-3 小时 新手友好度 86/100
-
Add ADM validation bypass for server-controlled fields on non-compliant objects可能已有人在做 @seansica 于 18 天前认领。 未关闭
mitre-attack/attack-workbench-rest-api#517 · 已指派 1 人 ·
-
难度 3/5 1-2 天 新手友好度 74/100
mitre-attack/attack-workbench-rest-api#512 · 1 条评论 ·
查看 mitre-attack/attack-workbench-rest-api 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
hexlet-codebattle/codebattle#2374 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
维护者通常 1 天内回复
-
security
难度 2/5 1-3 小时 新手友好度 62/100
Waschndolos/open-clubmanager#185 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 6 天内回复
-
难度 2/5 1-3 小时 新手友好度 70/100
维护者通常 1 天内回复