Skip to content

Commit

Permalink
Merge weid-java-sdk to WeIdentity repo
Browse files Browse the repository at this point in the history
Signed-off-by: chaoxinhu <chaoxinhu@hotmail.com>
  • Loading branch information
chaoxinhu committed Oct 15, 2019
1 parent 28e8e11 commit 7636640
Show file tree
Hide file tree
Showing 15 changed files with 401 additions and 1,577 deletions.
74 changes: 74 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# 如何贡献

---

非常感谢您对 WeIdentity 有兴趣。欢迎提交 Pull Request ,参与 bug 修复,文档优化,或者任何优化意见。

---

## 1. 发现 bug

使用过程中遇到的任何问题,可以查看 [FAQ](../docs/zh_CN/docs/faq.md) ,或者给我们提 [issue](https://github.com/WeBankFinTech/WeIdentity/issues)

## 2. 优化建议

有任何优化建议,欢迎给我们提 [issue](https://github.com/WeBankFinTech/WeIdentity/issues)

---

## 3. 贡献代码

### 3.1 开始之前

请先浏览WeIdentity工程遵循的相关规范,包括分支管理,代码规范,commit规范。

#### 分支管理

代码类工程我们使用 [git-flow](https://nvie.com/posts/a-successful-git-branching-model/) 进行分支管理。包括这些工程: [weid-java-sdk](https://github.com/WeBankFinTech/weid-java-sdk)[weid-contract](https://github.com/WeBankFinTech/weid-contract)
文档类工程我们使用 [github-flow](http://scottchacon.com/2011/08/31/github-flow.html) 进行分支管理。包括这些工程: [WeIdentity](https://github.com/WeBankFinTech/WeIdentity)

#### 代码规范

建议先浏览 [WeIdentity 代码规范](../docs/zh_CN/docs/styleguides/styleguides.md)

#### 测试

所有提交的代码必须通过单元测试,如果提交的代码目前的单元测试用例无法覆盖,可以修改单元测试代码从而覆盖用例,或者在 Pull Request 里面说明情况,然后由我们来补充单元测试用例。详见“[如何运行单元测试](../docs/zh_CN/docs/how-to-run-unit-test.md)”。

#### Commit Messages

使用英文简要描述修改点,每一行描述一个修改点,并以 `*` 开头,如下所示:

```text
first release for weid-contract
* Smart Contract for DID identity management, allowing external
addresses which satisfy FISCO-BCOS specifications to be used as the
identification tag.
* Smart Contract for Committee Membership management, including data &
logic contracts.
* Smart Contract for Authority Issuer Membership management, including
data & logic contracts.
```

---

### 3.2 流程

1. Fork 希望提交代码修改的 repository 。例如,如果想要修改 [weid-java-sdk](https://github.com/WeBankFinTech/weid-java-sdk) ,则 Fork 这个 repository。

2. 创建新的分支,例如分支取名为 `feature/add-verfiy-logic` (分支名请使用 `feature/` 开头)。

```shell
git checkout -b feature/add-verfiy-logic
```

3. 编写代码。

4. 运行单元测试(会自动运行单元测试,checkstyle,spotbugs)并通过。

5. Push 这个分支 `feature/verfiy-logic-bug-fix` 到自己的 repository。

6. 提交 Pull Request 到 repository 的 `develop` 分支, 并描述您的修改。例如描述修复的 bug,或者描述新增的功能(如果是较大的修改,建议在代码实现前提交一个[优化建议issue](https://github.com/WeBankFinTech/WeIdentity/issues),提前描述自己的设计)。并标记任意一个 maintainer 进行 review。

7. maintainer 完成review,合并您的 Pull Request 到 `develop` 分支,然后我们会在下一个发布时间点将其合并到 `master` 分支。感谢您的贡献。
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Describe what you expected to happen and what actually happened.
## Additional context
#### Config Files

- FISCO-BCOS: Please refer to [FISCO-BCOS site](https://github.com/FISCO-BCOS/FISCO-BCOS) for more details.
- WeIdentity: Grab them at /src/main/resources/.

#### Log Files
Expand Down
1 change: 0 additions & 1 deletion .github/ISSUE_TEMPLATE/bug_report_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ about: 根据使用WeIdentity过程中发现的问题,提交一份错误报告
## 其他内容
#### 配置文件

- FISCO-BCOS: 请访问 [FISCO-BCOS官网](https://github.com/FISCO-BCOS/FISCO-BCOS) 以获得更多细节信息。
- WeIdentity: 请上传所有位于 /src/main/resources/ 目录下的文件。

#### 日志文件
Expand Down
133 changes: 133 additions & 0 deletions README-en.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
`中文版本 <./README.rst>`_ | English Version

.. image:: docs/zh_CN/docs/images/weidentity-logo.png
:target: docs/zh_CN/docs/images/weidentity-logo.png
:alt: weidentity-logo.jpeg


----

What is WeIdentity?
===================

WeIdentity is a blockchain solution on Open Consortium Chain to serve as a hub for identity authentication by establishing identity of entities (e.g. persons or objects) on the chain and allowing the interchange of such information among organizations when authorized.
WeIdentity is an open source platform built by WeBank and promotes the values of Open Consortium Chain: streamline resources, collaborate to produce values and serve the public.

Modules
-------

WeIdentity includes two major modules: WeIdentity DID and WeIdentity Credential.

Decentralized Identifiers (WeIdentity DID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Traditionally, user identity is issued and managed by single centralized organization. With the advent of blockchain technology, it is possible to publish and distribute user identity on chain to allow more than one organization to manage on as a multi-centers solution
WeIdentity DID Module has come with a distributed identification protocol based on \ `FISCO-BCOS Blockchain Platform <https://fisco-bcos-documentation-en.readthedocs.io/en/latest/>`_\ , and \ `W3C DID specification <https://w3c-ccg.github.io/did-spec/>`_\, to create identities on chain and associate it with any person or object in the real world. Moreover, DID ensures the Subject’s owner with full rights of control and ownership of the identities.

The design goals of WeIdentity DID:

.. raw:: html

<embed>
<table style="width:100%;border-collapse:collapse">
<tr>
<th width="100">Objective</th>
<th>Description</th>
</tr>
<tr>
<td>Distributed</td>
<td>Distributed ID registration model removes the dependencies on traditional single, centralized registration organization. </td>
</tr>
<tr>
<td>Open Sourced</td>
<td>The solution is fully open sourced and publicly available.</td>
</tr>
<tr>
<td>Privacy</td>
<td>The actual content of identity or credential are stored off-chain to maintain minimal information on the chain. Such can prevent any 3rd party from speculating the actual identity in real-world using the information on the chain.</td>
</tr>
<tr>
<td>Portability</td>
<td>Data on WeIdentity can be ported into mainstream blockchain platforms or those which are compliant with WeIdentitie’s specification.</td>
</tr>
<tr>
<td>Interoperability</td>
<td>Provides standard interfaces to support cross chains or cross platforms interoperation.</td>
</tr>
<tr>
<td>Extensibility</td>
<td>The data model can be extended for different business scenarios while maintaining its operability, portability and simplicity.</td>
</tr>
</table>
<br />
</embed>



WeIdentity Credential
^^^^^^^^^^^^^^^^^^^^^

There are a lot of credentials describing identity in daily life such as personal identity card, driving license, account book, prescription, graduate certificate, property ownership certificate and credit report. WeIdentity Credential offers a complete set of `W3C Verifiable Credentials <https://w3c.github.io/vc-data-model/>`_ based solutions designated to standardize and digitize such credentials into a verifiable and interchangeable format. The solution also supports Selectively Disclosure of Credential attributes and generating evidence of Credentials on blockchain.

WeIdentity encourages certificate organization to issue their own standardized credential templates to enrich the ecosystem on open consortium chain.

More
^^^^

*
`Use Cases and Scenarios (Chinese Version) <https://weidentity.readthedocs.io/zh_CN/latest/docs/use-cases.html>`_

*
`WeIdentity Specification (Chinese Version) <https://weidentity.readthedocs.io/zh_CN/latest/docs/weidentity-spec.html>`_

*
`FAQ <https://weidentity.readthedocs.io/en/latest/docs/faq.html>`_

Current Status
---------------

WeIdentity is running on top of FISCO-BCOS with JAVA SDK provided for developers, please review the Installation & Deployment guide and SDK user guide listed below:


.. raw:: html

<embed>
<table style="border-collapse:collapse">
<tr>
<th width="20%">Integration Method</th>
<th width="40%">Documentation</th>
<th width="40%">Status</th>
</tr>
<tr>
<td style="text-align:center"><a href="https://github.com/WeBankFinTech/weid-java-sdk">JAVA SDK</a></td>
<td>
<ul>
<li><a href="https://weidentity.readthedocs.io/zh_CN/latest/docs/weidentity-installation.html">Installation and Deployment Guide (Chinese Version)</a></li>
<li><a href="https://weidentity.readthedocs.io/projects/javasdk/zh_CN/latest/docs/weidentity-java-sdk-doc.html">SDK User Guide (Chinese Version)</a></li>
<li><a href="https://weidentity.readthedocs.io/zh_CN/latest/docs/weidentity-rest.html">RestService Guide (Chinese Version)</a></li>
</ul>
</td>
<td>
<a href="https://travis-ci.org/WeBankFinTech/weid-java-sdk"><img src="https://travis-ci.org/WeBankFinTech/weid-java-sdk.svg?branch=master" /></a>
<a href="https://github.com/WeBankFinTech/weid-java-sdk/releases/latest"><img src="https://img.shields.io/github/release/WeBankFinTech/weid-java-sdk.svg" /></a>
<a href="https://search.maven.org/search?q=g:%22com.webank%22%20AND%20a:%22weid-java-sdk%22"><img src="https://img.shields.io/maven-central/v/com.webank/weid-java-sdk.svg?label=Maven%20Central" /></a>
<a href="https://app.codacy.com/app/webankadmin/weid-java-sdk?utm_source=github.com&utm_medium=referral&utm_content=WeBankFinTech/weid-java-sdk&utm_campaign=Badge_Grade_Dashboard"><img src="https://api.codacy.com/project/badge/Grade/9fc044b36fff4985bd69f1232380d5ee" /></a>
<a href="https://www.codefactor.io/repository/github/WeBankFinTech/weid-java-sdk"><img src="https://www.codefactor.io/repository/github/WeBankFinTech/weid-java-sdk/badge" /></a>
<a href="https://codecov.io/gh/WeBankFinTech/weid-java-sdk"><img src="https://codecov.io/gh/WeBankFinTech/weid-java-sdk/branch/master/graph/badge.svg" /></a>
<a href="https://www.gnu.org/licenses/lgpl-3.0"><img src="https://img.shields.io/badge/license-GNU%20LGPL%20v3.0-blue.svg" /></a>
</td>
</tr>
</table>
<br />
</embed>

Diving in
----------------

Now, please feel free to dive in via \ `this page <https://weidentity.readthedocs.io/zh_CN/latest/docs/one-stop-experience.html>`_ for a one-stop experience of WeIdentity.


Contact Us
----------

Email:weidentity@webank.com
33 changes: 0 additions & 33 deletions README.md

This file was deleted.

137 changes: 137 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
中文版本 | `English Version <./README-en.rst>`_

.. image:: context/weidentity-logo.png
:target: context/weidentity-logo.png


----

什么是 WeIdentity?
========================

WeIdentity是一套分布式多中心的技术解决方案,可承载实体对象(人或者物)的现实身份与链上身份的可信映射、以及实现实体对象之间安全的访问授权与数据交换。WeIdentity由微众银行自主研发并完全开源,秉承公众联盟链整合资源、交换价值、服务公众的理念,致力于成为链接多个垂直行业领域的分布式商业基础设施,促进泛行业、跨机构、跨地域间的身份认证和数据合作。

模块介绍
--------

WeIdentity目前主要包含两大模块:WeIdentity DID以及WeIdentity Credential。

分布式身份标识 (WeIdentity DID)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

传统方式中,用户的注册和身份管理完全依赖于单一中心的注册机构;随着分布式账本技术(例如区块链)的出现,分布式多中心的身份注册、标识和管理成为可能。
WeIdentity DID模块在\ `FISCO-BCOS区块链底层平台 <https://fisco-bcos-documentation.readthedocs.io/zh_CN/latest/>`_\ 上实现了一套符合\ `W3C DID规范 <https://w3c-ccg.github.io/did-spec/>`_\ 的分布式多中心的身份标识协议,使实体(人或物)的现实身份实现了链上的身份标识;同时,WeIdentity DID给与Subject(人或者物)直接拥有和控制自己身份ID的能力。

WeIdentity DID秉承以下设计理念:

.. raw:: html

<embed>
<table style="width:100%;border-collapse:collapse">
<tr>
<th width="100">目标</th>
<th>说明</th>
</tr>
<tr>
<td>多中心</td>
<td>分布式多中心的ID注册机制,摆脱对传统模式下单一中心ID注册的依赖</td>
</tr>
<tr>
<td>开源开放</td>
<td>技术方案完全开源,面向政府、企业、开发者服务</td>
</tr>
<tr>
<td>隐私保护</td>
<td>实体的现实身份和可验证数字凭证的内容进行链下存储。支持实体将信息最小化或者选择性披露给其他机构,同时防止任何第三方反向推测出实体在现实世界或其他场景语义中的身份</td>
</tr>
<tr>
<td>可移植性</td>
<td>基于WeIdentity规范,数据可移植至遵循同样规范的其他平台,兼容业务主流区块链底层平台</td>
</tr>
<tr>
<td>互操作性</td>
<td>提供标准化接口,支持跨链、跨平台互操作</td>
</tr>
<tr>
<td>可扩展性</td>
<td>保证操作性,可移植性或简单性的情况下,数据模型可以通过多种不同方式进行扩展</td>
</tr>
</table>
<br />
</embed>



可验证数字凭证 (WeIdentity Credential)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

现实世界中存在着各种各样用于描述实体身份、实体间关系的数据,如身份证、行驶证、存款证明、处方、毕业证、房产证、信用报告等。WeIdentity Credential提供了一整套基于\ `W3C VC规范 <https://w3c.github.io/vc-data-model/>`_\ 的解决方案,旨在对这一类数据进行标准化、电子化,生成可验证、可交换的「凭证」(Credential),支持对凭证的属性进行选择性披露,及生成链上存证(Evidence)。

WeIdentity支持认证机构自行注册标准化凭证模板,共同丰富公众联盟链的生态。

更多
^^^^

*
`案例及场景 <https://weidentity.readthedocs.io/zh_CN/latest/docs/use-cases.html>`_

*
`WeIdentity规范文档 <https://weidentity.readthedocs.io/zh_CN/latest/docs/weidentity-spec.html>`_


当前状态
--------

WeIdentity目前支持基于FISCO-BCOS的区块链,并提供Java SDK及RestService方式供部署。具体的规范文档、安装部署和使用指引如下表所示:


.. raw:: html

<embed>
<table border='1' style="border-collapse:collapse" class='tables'>
<tr>
<th width="20%">集成方法</th>
<th width="30%">文档入口</th>
<th width="50%">当前状态</th>
</tr>
<tr>
<td style="text-align:center"><a href="https://github.com/WeBankFinTech/weid-java-sdk">Java SDK</a></td>
<td>
<ul>
<li><a href="https://weidentity.readthedocs.io/zh_CN/latest/docs/weidentity-installation.html">安装部署文档</a></li>
<li><a href="https://weidentity.readthedocs.io/projects/javasdk/zh_CN/latest/docs/weidentity-java-sdk-doc.html">SDK使用文档</a></li>
<li><a href="https://weidentity.readthedocs.io/zh_CN/latest/docs/weidentity-rest.html">RestService集成文档</a></li>
</ul>
</td>
<td>
<a href="https://travis-ci.org/WeBankFinTech/weid-java-sdk"><img src="https://travis-ci.org/WeBankFinTech/weid-java-sdk.svg?branch=master" /></a>
<a href="https://github.com/WeBankFinTech/weid-java-sdk/releases/latest"><img src="https://img.shields.io/github/release/WeBankFinTech/weid-java-sdk.svg" /></a>
<a href="https://search.maven.org/search?q=g:%22com.webank%22%20AND%20a:%22weid-java-sdk%22"><img src="https://img.shields.io/maven-central/v/com.webank/weid-java-sdk.svg?label=Maven%20Central" /></a>
<a href="https://app.codacy.com/app/webankadmin/weid-java-sdk?utm_source=github.com&utm_medium=referral&utm_content=WeBankFinTech/weid-java-sdk&utm_campaign=Badge_Grade_Dashboard"><img src="https://api.codacy.com/project/badge/Grade/9fc044b36fff4985bd69f1232380d5ee" /></a>
<a href="https://www.codefactor.io/repository/github/WeBankFinTech/weid-java-sdk"><img src="https://www.codefactor.io/repository/github/WeBankFinTech/weid-java-sdk/badge" /></a>
<a href="https://codecov.io/gh/WeBankFinTech/weid-java-sdk"><img src="https://codecov.io/gh/WeBankFinTech/weid-java-sdk/branch/master/graph/badge.svg" /></a>
<a href="https://www.gnu.org/licenses/lgpl-3.0"><img src="https://img.shields.io/badge/license-GNU%20LGPL%20v3.0-blue.svg" /></a>
</td>
</tr>
</table>
<br />
</embed>

感受WeIdentity
----------------

接下来,您可以在\ `此页 <https://weidentity.readthedocs.io/zh_CN/latest/docs/one-stop-experience.html>`_,一站式了解WeIdentity的参考场景,体验Demo流程,并了解完整的部署方式及参考实现。


联系我们
--------

邮箱:weidentity@webank.com


如何贡献
--------

*
详见:\ `如何贡献 <https://github.com/WeBankFinTech/WeIdentity/blob/master/.github/CONTRIBUTING.md>`_

0 comments on commit 7636640

Please sign in to comment.