feat(jumpserver): add bastionhost v4.10.16 service#228
Open
Hoy11 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
feat(jumpserver): add bastionhost v4.10.16 service
接入设备
JumpServer 堡垒机(JumpServer Bastionhost)V4.10.16,堡垒机 / 网关接入平台,提供资产、用户、在线会话等安全运营常用数据查询能力。服务包
services/jumpserver__bastionhost_v4-10-16,proto 包JumpServer_Bastionhost_V41016。设备版本
JumpServer V4.10.16,REST API 基础路径
http://<ip>/api/v1。本次验证环境使用 Docker 镜像jumpserver/jms_all:v4.10.16部署,API 文档地址为/api/docs/,OpenAPI JSON 地址为/api/swagger.json。认证方式
支持两种认证方式:
Bearer Token 认证
secret.token或secret.authorizationAuthorization: Bearer <token>或完整Authorization值用户名 / 密码登录认证
secret.username/secret.passwordPOST /api/v1/authentication/auth/keyword和tokenAuthorization: Bearer <token>私有化部署或自签名 HTTPS 场景可通过
config.rejectUnauthorized: false跳过证书校验。默认超时时间由config.timeoutMs控制。实现方法
方式:RPC(gRPC / Connect RPC / MCP,4 个方法)
ListAssetsGET /api/v1/assets/assets/limit、offset、search、platformGetAssetGET /api/v1/assets/assets/{id}/ListUsersGET /api/v1/users/users/limit、offset、searchListOnlineSessionsGET /api/v1/terminal/sessions/?is_finished=false错误映射:
INVALID_ARGUMENTUNAUTHENTICATEDPERMISSION_DENIEDUNAVAILABLEUNKNOWN风险边界:
测试命令
本地验证结果:
validate: passedtest: 22/22 passpack:check: passedOctoBus 导入与调用验证
Connect RPC 调用示例:
验证结果:
ListUsers: 返回 2 条用户ListAssets: 返回 3 条资产GetAsset: 返回指定资产详情ListOnlineSessions: 接口调用成功,当前在线会话为空已知限制
endpoint、apiPrefix和rejectUnauthorized。ListOnlineSessions仅查询is_finished=false的当前在线会话;无在线会话时返回空列表。真实设备验证
以下联调证据来自 JumpServer V4.10.16 测试实例。敏感信息已脱敏:Token、Cookie、密码、真实内网地址、邮箱、部分资产地址均使用
******或10.2.36.xxx替代,保留完整请求路径、状态码和响应结构。联调证据:认证接口 跑通
联调证据:ListUsers 跑通
联调证据:ListAssets 跑通
联调证据:GetAsset 跑通
联调证据:ListOnlineSessions 跑通