Skip to content

Commit

Permalink
Integrating links fix (hyperledger-archives#2067)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdProsser authored and nklincoln committed Sep 6, 2017
1 parent 63479c1 commit b95d962
Show file tree
Hide file tree
Showing 7 changed files with 44 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ The {{site.data.conrefs.composer_short}} Playground is a tool which provides a s

Before beginning, you will need:

* A GitHub account (if you want to import sample business networks from GitHub)
* A supported browser i.e. any modern version of Chrome, Firefox or Safari

---
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: start
section: integrating
index-order: 704
sidebar: sidebars/accordion-toc0.md
excerpt: By default, the Hyperledger Composer REST server services all requests by using the Blockchain identity specified on the command line at startup. By [**enabling authentication, the identity of the client can be used to digitally sign all transactions made by that client.**](./securing-the-rest-server.html)
excerpt: The REST server can be [**configured to multiple user mode**](./enabling-multiuser.html). Multiple user mode permits clients of the REST server to provide their own Blockchain identities for digitally signing transactions. This enables the business network to differentiate between different clients of the REST server.
---

# Enabling multiple user mode for the REST server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: start
section: integrating
index-order: 703
sidebar: sidebars/accordion-toc0.md
excerpt: By default, the Hyperledger Composer REST server services all requests by using the Blockchain identity specified on the command line at startup. By [**enabling authentication, the identity of the client can be used to digitally sign all transactions made by that client.**](./securing-the-rest-server.html)
excerpt: The REST server can be [**configured to authenticate clients**](./enabling-rest-authentication.html). When this option is enabled, clients must authenticate to the REST server before they are permitted to call the REST API.
---

# Enabling authentication for the REST server
Expand Down Expand Up @@ -79,7 +79,7 @@ Now, navigate to the REST API explorer at http://localhost:3000/explorer/. Attem

When a user authenticates to the REST server, a unique access token is generated and assigned to the authenticated user. When the user authenticates using a web browser, the access token is stored in a cookie in the local storage of the users web browser. When the authenticated user makes a subsequent request, the access token is retrieved from the cookie, and the access token is validated instead of reauthenticating the user.

The access token can be used to authenticate any HTTP or REST client that wishes to call the REST server. This is required when the HTTP or REST client cannot perform the authentication flow required by the configured Passport strategy. For example, all OAuth2 web authentication flows require the use of a web browser to navigate to the authentication providers website.
The access token can be used to authenticate any HTTP or REST client that wishes to call the REST server. This is required when the HTTP or REST client cannot perform the authentication flow required by the configured Passport strategy. For example, all OAuth2 web authentication flows require the use of a web browser to navigate to the authentication providers website.

In order to use the access token, the access token must first be retrieved using a web browser. When you authenticate to the REST server, the REST API explorer at http://localhost:3000/explorer/ will show the access token at the top of the page. By default the access token is hidden, but it can be displayed by clicking the `Show` button. The access token is a long alphanumeric string, for example: `e9M3CLDEEj8SDq0Bx1tkYAZucOTWbgdiWQGLnOxCe7K9GhTruqlet1h5jsw10YjJ`

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: start
section: integrating
index-order: 702
sidebar: sidebars/accordion-toc0.md
excerpt: Hyperledger Composer includes a standalone [**Node.js process that exposes a business network as a REST API**](./getting-started-rest-api.html). The LoopBack framework is used to generate an Open API, described by a Swagger document.
excerpt: The REST server can be [**configured to subscribe to business events**](./publishing-events.html) that are emitted from a deployed business network, and publish those business events out to client applications.
---

# Publishing events from the REST server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ category: start
section: integrating
index-order: 705
sidebar: sidebars/accordion-toc0.md
excerpt: By default, the Hyperledger Composer REST server services all requests by using the Blockchain identity specified on the command line at startup. By [**enabling authentication, the identity of the client can be used to digitally sign all transactions made by that client.**](./enabling-rest-authentication.html)
excerpt: When deploying Hyperledger Composer REST server in a production environment, the REST server should be [**configured to be secured with HTTPS and TLS**](./securing-the-rest-server.html) (Transport Layer Security). Once the REST server has been configured with HTTPS and TLS, all data transferred between the REST server and all of the REST clients is encrypted.
---

# Securing the REST server using HTTPS and TLS
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,13 @@ Assets must have a unique identifier, but other than that, they can contain what

### Participants

Participants are members of a business network. They may own assets and submit transactions. Participant types are modelled, and like assets, must have an identifier and can have any other properties as required.
Participants are members of a business network. They may own assets and submit transactions. Participant types are modeled, and like assets, must have an identifier and can have any other properties as required.

---

### Identities and ID cards

Within a business network, participants can be associated with an identity. ID cards are a combination of an identity, a connection profile, and metadata. ID cards simplify the process of connecting to a business network, and extend the concept of an identity outside the business network to a 'wallet' of identities, each associated with a specific business network and connection profile.

---

Expand All @@ -56,6 +62,12 @@ Transactions are the mechanism by which participants interact with assets. This

---

### Queries

Queries are used to return data about the blockchain world-state. Queries are defined within a business network, and can include variable parameters for simple customization. By using queries, data can be easily extracted from your blockchain network. Queries are sent by using the {{site.data.conrefs.composer_full}} API.

---

### Events

Events are defined in the business network definition in the same way as assets or participants. Once events have been defined, they can be emitted by transaction processor functions to indicate to external systems that something of importance has happened to the ledger. Applications can subscribe to emitted events through the `composer-client` API.
Expand Down
57 changes: 26 additions & 31 deletions packages/composer-website/jekylldocs/playground/playground-index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,63 +17,58 @@ If you are new to the Playground, we recommend that you follow the [Playground T

# Navigating Playground

## Landing Page
## The wallet page

The **My Wallet** page is the default Playground landing page. Here you can see all the ID Cards in your Wallet. Each ID Card provides all of the information needed to connect to a blockchain business networks. It is only possible to access a blockchain Business Network through a valid ID Card. Once connected to a deployed Business Network, you will be taken to the **Define** page.
The **My Wallet** page is the default Playground landing page. Here you can see all the ID Cards in your Wallet. Each ID Card provides all of the information needed to connect to a blockchain business network. It is only possible to access a blockchain business network by using a valid ID Card. Once connected to a deployed Business Network, you will be taken to the **Define** page.

![wallet-page](./wallet-page.png)

The page options comprise:
From this page you can:

- Deploy new business network ‘card’. If this is your first time using Playground, or you wish to start a new network, you should press this button. When you press the button, you will begin the process of creating a new Business Network from scratch, or by using one of our provided samples as a base.
- ID Cards. An ID Card is what is used to connect to a blockchain Business Network. The card contains the identity, connection profile and the name of the target business network. The card provides options to delete the identity/card, export the card, and to connect to the corresponding business network.
- Import ID Card. It is possible to import an ID Card from a .card file on your computer. To do so, simply browse to the file using your file explorer, or drag-and-drop the file into the designated area.
- Connect using credentials. If you have been provided with some credentials by an administrator, you can use this button to connect to the business network.
- Tutorial. By pressing this link you will be navigated to the Playground tutorial.

## Editor Global Options
- Connect to a business network. If you already have a deployed business network and an ID card created for it, you can click **Connect now** to connect to the business network.
- Deploy a new business network. If this is your first time using Playground, or you wish to start a new network, deploying your own network is a great place to start. When creating a new business network, you can choose to base your business network definition on a sample network, or create your own network from scratch.
- Interact with ID cards. ID cards are used to connect to business networks which already exist, and are a combination of connection profile and identity. The card provides options to delete the identity/card, export the card, and to connect to the corresponding business network.
- Import ID cards. Importing an existing `.card` file from your computer is the simplest way to add an ID card to your wallet.
- Connect using a user ID and user secret. If you have been provided with a user ID and user secret by your network administrator, click **Connect using credentials** to enter them and generate an ID card.
- Run through the Playground tutorial. If you don't know where to start, the Playground tutorial runs through creating a business network from scratch, and performing some basic operations.

The Editor define and test pages contain a header that shares interaction options.
## Business network options

Once connected to a business network using an ID card, there are a number of options available whether you're looking at the **Define** tab, or the **Test** tab.

![editor-header](./editor-header.png)

From left to right, the header contains:
- In the upper-left is the name of the connection profile you're using and the business network you're connected to. In the example above, the connection profile is called _Web_ and the business network name is _basic-sample-network_.
- Links to the **Define** and **Test** tabs. In the **Define** tab, you can add, modify and delete the content of your business network, and in the **Test** tab you can create assets and participants that were defined in the **Define** tab, and test the functionality of your business network.
- On the upper-right is a dropdown menu displaying the identity which is being used to connect to the business network. The dropdown contains a link to the **Identity Registry**, and the ability to log out of the business network, returning to the **My Wallet** screen.

- The name of the connection profile in use, and the Busines Network to which you are connected. In the above, it is Web and basic-sample-network respectively.
- Tabs that enable you to move between the Define and Test pages.
- A drop-down that is labelled with the current Identity, which enables you to work with the Identity Registry (for issuing identities) and to log out of the Business Network.
## The Define tab

## Editor - Define
The Editor Define page is the page that is used to create, edit and update your Business Network.
The Define tab is used to create, edit and update your business network.

![editor-define-page](./editor-define.png)

The left hand side of the page contains:
On the left of the **Define** tab, you can see a list of all the files in your current business network definition. To examine the contents of a file, click on it, and it will appear in the editor view. New files can be added to your business network with the **Add a file** button. Model files, script files, access control files, and query files can be added to your business network.

- The Navigator, which displays all the files within your Business Network. By selecting a file within the list, it will be displayed in the central editor panel.
- Add File button, which enables you to add a new file to your Business Network definition.
- Update button, which updates the deployed Business Network to match that shown within the Editor.
- Import/Replace button, which enables you to replace the complete Business Network definition within the editor. You may chose to import a Business Network based on a set of samples, or Business Network Archive file from disc.
- Export button, which will export the Business Network definition within the Editor as a Business Network Archive (.bna) file.
Once you've added and modified the files for your business network definition, you can deploy the changes to your network with the **Update** button. After click **Update** you can experiment with your changes in the **Test** tab. The **Import/Replace** button allows you to import a business network, either from your own computer, or import a business network from our samples. Conversely, the **Export** button downloads your current business network as a business network archive `.bna` file.

The central editor panel will display the currently selected file from the navigator. Using the editor, you can develop all aspects of your blockchain Business Network.
## The Test tab

## Editor - Test
The Editor Test page is used to test the deployed Business Network through the creation of Participants, Assets and the submission of Transactions.
The **Test** tab is used to test the deployed business network by using the asset types, participant types, and transactions which you defined in the **Define** tab.

![editor-test-page](./editor-test.png)

The left hand side of the page contains:
On the left of the **Test** tab, each participant type and asset type is listed. Clicking on a participant type, asset type, or **All transactions** will display a registry, showing all active instances of that type. For example, by clicking **SampleParticipant**, you can see a registry showing all _SampleParticipants_ that have been created. If it's the first time you've looked at the **Test** tab, your registries will be empty!

From within each registry, you can create the corresponding asset, participant, or submit the corresponding transaction.

- Participant registry, which shows all Participants within the Business Network. Within this view it is possible to add a new Participant through the Create New Participant button shown on the upper menu, and update or remove existing Participants.
- Asset registry, which shows all Assets within the Business Network. Within this view it is possible to add a new Asset through the Create New Asset button shown on the upper menu, and update or remove existing Assets.
- Transaction registry, which shows Historian Records of Transactions that have occurred within the Business Network.
- Submit Transaction button, which enables the sumbission of a Transaction that is described within a script file of the Business Network definition.
In the **All transactions** registry, also known as the Historian, you can see a record of each transaction that has taken place in your business network, including some transactions which are caused by system events, such as creating participants or assets. In the transaction registry, you can submit transactions, and then check that their effects have occurred by checking the resources that were changed.

---
# Playground Tasks

###ID Cards
### ID Cards
* [Provide Access To Your Business Network With an ID Card](./id-cards-playground.html#provide)
* [Gain Access To A Business Network with an ID Card](./id-cards-playground.html#gain)

Expand Down

0 comments on commit b95d962

Please sign in to comment.