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

Add capsule manager apis #8

Merged
merged 6 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# Copyright 2023 Ant Group Co., Ltd.
#
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#
# http://www.apache.org/licenses/LICENSE-2.0
#
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand Down Expand Up @@ -67,7 +67,7 @@ jobs:
python3 -m pip install grpcio-tools==1.48.2 mypy-protobuf==3.1.0 protobuf==3.19.4 twine
make build
ls dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
python3 -m twine upload -r pypi -u __token__ -p ${PYPI_TWINE_TOKEN} dist/*.whl
# Invoke jobs via workflows
# See: https://circleci.com/docs/2.0/configuration-reference/#workflows
Expand Down
28 changes: 15 additions & 13 deletions python/setup.py
Original file line number Diff line number Diff line change
@@ -1,26 +1,28 @@
import setuptools
import os


def read(fname):
with open(os.path.join(os.path.dirname(__file__), fname)) as f:
return f.read()


setuptools.setup(
name = "sdc-apis",
version = "0.1.0b0",
author = "secretflow",
author_email = "[email protected]",
description = "SecretFlow Data Capsule apis proto generated python",
long_description_content_type = 'text/markdown',
long_description = 'SecretFlow Data Capsule apis proto generated python',
license = "Apache 2.0",
url = "https://github.com/secretflow/secure-data-capsule-apis",
packages = setuptools.find_packages(),
install_requires = read('requirements.txt'),
classifiers = [
name="sdc-apis",
version="0.2.0.dev20230930",
author="secretflow",
author_email="[email protected]",
description="SecretFlow Data Capsule apis proto generated python",
long_description_content_type="text/markdown",
long_description="SecretFlow Data Capsule apis proto generated python",
license="Apache 2.0",
url="https://github.com/secretflow/secure-data-capsule-apis",
packages=setuptools.find_packages(),
install_requires=read("requirements.txt"),
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: Apache Software License",
"Operating System :: OS Independent",
],
include_package_data=True,
)
)
8 changes: 3 additions & 5 deletions secretflowapis/v1/common.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2023 Ant Group Co., Ltd.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -17,8 +17,6 @@ syntax = "proto3";

package secretflowapis.v1;

option java_package = "com.alipay.secretflow.secretflowapis.v1";
option java_outer_classname = "CommonProto";

// RequestHeader carries the user custom headers.
message RequestHeader {
Expand Down
6 changes: 2 additions & 4 deletions secretflowapis/v1/sdc/authmanager/auth_manager.proto
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import "secretflowapis/v1/sdc/teeapps/tee_task_params.proto";

package secretflowapis.v1.sdc.authmanager;

option java_package = "com.alipay.secretflow.secretflowapis.v1.sdc.authmanager";
option java_outer_classname = "AuthManagerProto";

message GetExportDataKeyRequest {
RequestHeader header = 1;
Expand Down Expand Up @@ -62,8 +60,8 @@ message ComputeMeta {
// The data storage path and the corresponding data decryption key
DataUri data_uri_with_dks = 2;
}
// data_uuid -> meta
map<string, InputMeta> input_metas = 3;
// The order of `input_metas` is same to `TeeTaskParams.inputs`.
repeated InputMeta input_metas = 3;

// The public key of AuthManager
//
Expand Down
8 changes: 3 additions & 5 deletions secretflowapis/v1/sdc/core.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2023 Ant Group Co., Ltd.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -19,8 +19,6 @@ import "google/protobuf/any.proto";

package secretflowapis.v1.sdc;

option java_package = "com.alipay.secretflow.secretflowapis.v1.sdc";
option java_outer_classname = "CoreProto";

enum PrimitiveDataType {
PrimitiveDataType_UNDEFINED = 0;
Expand Down
4 changes: 1 addition & 3 deletions secretflowapis/v1/sdc/dataagent/data_agent.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ import "secretflowapis/v1/sdc/digital_envelope.proto";

package secretflowapis.v1.sdc.dataagent;

option java_package = "com.alipay.secretflow.secretflowapis.v1.sdc.dataagent";
option java_outer_classname = "DataAgentProto";

// 机构注册自己的公钥
message RegisterInsPubKeyRequest {
Expand Down Expand Up @@ -357,7 +355,7 @@ message PartitionIdInfo {
// 2. 读取某个分区:分区格式为 ${yyyymmdd},时区为 UTC+0, 如 20230404
// 3. 读取一个范围的分区:(${yyyymmdd},${yyyymmdd}), 为闭区间,
// 如 (20230304,20230404) 表示从 20230304(包含) 到 20230404(包含) 的所有分区
// 4. 2 和 3 可以组合以冒号隔开,如 (20230304,20230404);20230201
// 4. 2 和 3 可以组合以冒号隔开,如 (20230304,20230404);20230201
// 表示从 20230304(包含) 到 20230404(包含)的所有分区以及 20230201 分区
string partition_expr = 3;
}
Expand Down
8 changes: 3 additions & 5 deletions secretflowapis/v1/sdc/digital_envelope.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2023 Ant Group Co., Ltd.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -17,8 +17,6 @@ syntax = "proto3";

package secretflowapis.v1.sdc;

option java_package = "com.alipay.secretflow.secretflowapis.v1.sdc";
option java_outer_classname = "DigitalEnvelopeProto";

/// 公钥定义
// 目前系统中,国密和国际密码标准不会出现混用的情况:
Expand Down
8 changes: 3 additions & 5 deletions secretflowapis/v1/sdc/teeapps/tee_task_params.proto
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// Copyright 2023 Ant Group Co., Ltd.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
Expand All @@ -19,8 +19,6 @@ import "google/protobuf/any.proto";

package secretflowapis.v1.sdc.teeapps;

option java_package = "com.alipay.secretflow.secretflowapis.v1.sdc.teeapps";
option java_outer_classname = "TeeTaskParamsProto";

message TeeTaskParams {
message Input {
Expand Down
2 changes: 0 additions & 2 deletions secretflowapis/v1/status.proto
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ import "google/protobuf/any.proto";

package secretflowapis.v1;

option java_package = "com.alipay.secretflow.secretflowapis.v1";
option java_outer_classname = "StatusProto";

message Status {
// The status code, which should be one of google rpc code or custom code.
Expand Down
25 changes: 25 additions & 0 deletions secretflowapis/v2/common.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// Copyright 2023 Ant Group Co., Ltd.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//

syntax = "proto3";

package secretflowapis.v2;


// RequestHeader carries the user custom headers.
message RequestHeader {
// Custom headers used to record custom information.
map<string, string> custom_headers = 1;
}
Loading
Loading