Skip to content

feat(auth): migrate from token-based to RAM signature authentication#65

Open
OhYee wants to merge 2 commits intomainfrom
feat-new-auth
Open

feat(auth): migrate from token-based to RAM signature authentication#65
OhYee wants to merge 2 commits intomainfrom
feat-new-auth

Conversation

@OhYee
Copy link
Member

@OhYee OhYee commented Mar 9, 2026

Migrate authentication mechanism from token-based approach to RAM signature authentication for enhanced security. The changes replace the existing access token system with Alibaba Cloud's Resource Access Management (RAM) signature verification, requiring users to configure access key ID and secret for API calls. Updates include implementation of RAM signature generation, modification of authentication endpoints with '-ram' suffix, and comprehensive updates to all API clients across runtime, sandbox, and toolset modules.

This migration affects all API interactions within the SDK, including data API operations, browser automation endpoints, and OpenAI integration points. The new authentication system provides improved security through signature-based verification while maintaining backward compatibility for existing configurations.

The changes also include updates to test suites to validate the new authentication flow and ensure proper handling of both authenticated and unauthenticated requests.

将身份验证机制从基于令牌的方式迁移到 RAM 签名身份验证,以提高安全性。更改将现有的访问令牌系统替换为阿里云资源访问管理 (RAM) 签名验证,要求用户为 API 调用配置访问密钥 ID 和密钥。更新包括实现 RAM 签名生成、使用 '-ram' 后缀修改身份验证端点,以及对运行时、沙箱和工具集模块中的所有 API 客户端进行全面更新。

此迁移会影响 SDK 内的所有 API 交互,包括数据 API 操作、浏览器自动化端点和 OpenAI 集成点。新的身份验证系统通过基于签名的验证提供增强的安全性,同时保持现有配置的向后兼容性。

这些更改还包括更新测试套件以验证新的身份验证流程,并确保正确处理经过身份验证和未经身份验证的请求。

Change-Id: I2585151e1acab0f476d9ba9ed909aabd212e5f2c

Thank you for creating a pull request to contribute to Serverless Devs agentrun-sdk-python code! Before you open the request please answer the following questions to help it be more easily integrated. Please check the boxes "[ ]" with "[x]" when done too.
Please select one of the PR types below to complete


Fix bugs

Bug detail

The specific manifestation of the bug or the associated issue.

Pull request tasks

  • Add test cases for the changes
  • Passed the CI test

Update docs

Reason for update

Why do you need to update your documentation?

Pull request tasks

  • Update Chinese documentation
  • Update English documentation

Add contributor

Contributed content

  • Code
  • Document

Content detail

if content_type == 'code' || content_type == 'document':
    please tell us `PR url`,like: https://github.com/Serverless-Devs/agentrun-sdk-python/pull/1
else:
    please describe your contribution in detail

Others

Reason for update

Why do you need to update your documentation?

OhYee added 2 commits March 9, 2026 14:43
Migrate authentication mechanism from token-based approach to RAM signature authentication for enhanced security. The changes replace the existing access token system with Alibaba Cloud's Resource Access Management (RAM) signature verification, requiring users to configure access key ID and secret for API calls. Updates include implementation of RAM signature generation, modification of authentication endpoints with '-ram' suffix, and comprehensive updates to all API clients across runtime, sandbox, and toolset modules.

This migration affects all API interactions within the SDK, including data API operations, browser automation endpoints, and OpenAI integration points. The new authentication system provides improved security through signature-based verification while maintaining backward compatibility for existing configurations.

The changes also include updates to test suites to validate the new authentication flow and ensure proper handling of both authenticated and unauthenticated requests.

将身份验证机制从基于令牌的方式迁移到 RAM 签名身份验证,以提高安全性。更改将现有的访问令牌系统替换为阿里云资源访问管理 (RAM) 签名验证,要求用户为 API 调用配置访问密钥 ID 和密钥。更新包括实现 RAM 签名生成、使用 '-ram' 后缀修改身份验证端点,以及对运行时、沙箱和工具集模块中的所有 API 客户端进行全面更新。

此迁移会影响 SDK 内的所有 API 交互,包括数据 API 操作、浏览器自动化端点和 OpenAI 集成点。新的身份验证系统通过基于签名的验证提供增强的安全性,同时保持现有配置的向后兼容性。

这些更改还包括更新测试套件以验证新的身份验证流程,并确保正确处理经过身份验证和未经身份验证的请求。

Change-Id: I2585151e1acab0f476d9ba9ed909aabd212e5f2c
Signed-off-by: OhYee <oyohyee@oyohyee.com>
…rmatting

Add explicit return None statements in ToolSet methods and improve code
formatting for better readability and consistency across the codebase.

在 ToolSet 方法中添加显式的返回语句并改进代码格式

在 ToolSet 方法中添加显式的 return None 语句,并改进代码格式以提高代码库的一致性和可读性。

Change-Id: Icd499f1ccb977bc443f690d81b0694535dc1b99a
Signed-off-by: OhYee <oyohyee@oyohyee.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant