Skip to content

Commit

Permalink
Merge pull request #51 from apigee/rev/v1.0.0
Browse files Browse the repository at this point in the history
rev/v1.0.0
  • Loading branch information
rohan-m authored Sep 13, 2017
2 parents 9e7c33e + d88ae37 commit ce4689c
Show file tree
Hide file tree
Showing 105 changed files with 15,700 additions and 5,366 deletions.
44 changes: 41 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@ This document is organized into the following sections
- [Getting Started](#getting-started)
- [Installation](#installation)
- [Test](#Test)
- [Developer Portal](#developer-portal)

[Developer Portal](#developer-portal)

- [Developer Portal Setup](#developer-portal-setup)

[Data](#data)

[Notes for Implementors](#notes-for-implementors)

- [Client App Developers](#client-app-developers)
- [API Deployment](#api-deployment)

[Changelog](#changelog)

Expand Down Expand Up @@ -219,9 +229,37 @@ run tests
gulp test
```

### Developer Portal

Developer Portal setup is detailed in a separate [document](./src/devportal/README.md)
## Developer Portal
Every API provider must be able to educate developers and successfully expose their APIs. A developer portal is the face of your API program, providing everything that internal, partner, and third party developers need.

Developers need to interact with the Banks and with each other. Enable your developer community to provide feedback, make support and feature requests, and submit their own content that can be accessed by other developers with the right developer portal.

Apigee Edge provides with a Developer Services portal that you can use to build and launch your own customized website to provide all of these services to your development community. One has the option to create their own developer portal, either in the cloud or on-premises.

The below picture depicts how a dev portal looks like

![developer-portal](images/openbank.png)

### Developer Portal Setup
The detailed instructions for developer portal setup for openbank solution can be found [Here](./src/devportal/README.md).

## Data
The dummy Backend system is created by the deploy script for this OpenBank solution and is hosted on [Baas 2.0](http://apibaas.apigee.com/) in your org. You can find the dummy data under `./setup/data` folder

## Notes for Implementors

### Client App Developers

- The APIs use Public/Private Key pair for doing JWS signing of the Payload. The Public Key of the sample bank and Private Key for the sample TPP (Client App) are present in `./test` folder.

### API Deployment

- You can find two sets of Public/Private Key Pair under `./test` folder; you could use it for configuring the APIs to use them for signing/verifying the responses/requests.
- Private key for the bank has to be provided during deployment. It is recommended to define a Prompt in config.yml and use it as value for the private key.
- For Production access, a Mutual TSL connectivity needs to be configured as defined [here](http://docs.apigee.com/api-services/content/creating-virtual-host).
- While running `gulp deploy` please do make sure there are no custom APIs defined with the same names; otherwise those APIs will be overwritten with a new revision.


## Changelog

Expand Down
4 changes: 2 additions & 2 deletions config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ resources:
type: app
items:
- name: AISP_App
payload: '{"name":"AISP_App","attributes":[{"name":"tppId","value":"12345"},{"name":"publicKey","value":"-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuZhaB6ciF8hzzHkv3tkl20LS8KfWgRb/V4I6pB9ADNPBNgrceSf+mLoIWxrRDgTSYqyYYXmj3Fy9B1mG4lpUvrClt4hHKaBvsRZKn4/r2dPxUo0ggI+ruxQaQoKf2v8sEJe6Sx7btBvBxTqOMlIxP1GDNYJICaXo8jsBeNVDtCeFP2e9QJUmNvYGY7IfB8vUqFFcHushNmKmdR5H6pUg/JOsheFyi41UT05Zu3FvMHBAJab4OnybOLrovCVshu3Q7BOFkQVkYF4HrD0IM4GDojGt4OfMqESnLvG7+UywNjs/zjmdX0mn1wG7mZjlXfgh0DKo/MeWCW+gEQdPejCrBwIDAQAB -----END PUBLIC KEY-----"}],"callback":"http://localhost/","email":"[email protected]","apiProducts":"account_apis"}'
payload: '{"name":"AISP_App","attributes":[{"name":"tppId","value":"12345"},{"name":"publicKey","value":"-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuZhaB6ciF8hzzHkv3tkl20LS8KfWgRb/V4I6pB9ADNPBNgrceSf+mLoIWxrRDgTSYqyYYXmj3Fy9B1mG4lpUvrClt4hHKaBvsRZKn4/r2dPxUo0ggI+ruxQaQoKf2v8sEJe6Sx7btBvBxTqOMlIxP1GDNYJICaXo8jsBeNVDtCeFP2e9QJUmNvYGY7IfB8vUqFFcHushNmKmdR5H6pUg/JOsheFyi41UT05Zu3FvMHBAJab4OnybOLrovCVshu3Q7BOFkQVkYF4HrD0IM4GDojGt4OfMqESnLvG7+UywNjs/zjmdX0mn1wG7mZjlXfgh0DKo/MeWCW+gEQdPejCrBwIDAQAB -----END PUBLIC KEY-----"}],"callback":"http://localhost/,https://api.enterprise.apigee.com/v1/o/{{ org }}/apimodels/accounts-apis-v1-0/templateauths/PSUOAuth2Security/callback","email":"[email protected]","apiProducts":"account_apis"}'
assignResponse:
- from: credentials.0.consumerKey
to: apiKey_AISP
Expand All @@ -209,7 +209,7 @@ resources:
- from: appId
to: appId_AISP
- name: PISP_App
payload: '{"name":"PISP_App","attributes":[{"name":"tppId","value":"12345"},{"name":"publicKey","value":"-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuZhaB6ciF8hzzHkv3tkl20LS8KfWgRb/V4I6pB9ADNPBNgrceSf+mLoIWxrRDgTSYqyYYXmj3Fy9B1mG4lpUvrClt4hHKaBvsRZKn4/r2dPxUo0ggI+ruxQaQoKf2v8sEJe6Sx7btBvBxTqOMlIxP1GDNYJICaXo8jsBeNVDtCeFP2e9QJUmNvYGY7IfB8vUqFFcHushNmKmdR5H6pUg/JOsheFyi41UT05Zu3FvMHBAJab4OnybOLrovCVshu3Q7BOFkQVkYF4HrD0IM4GDojGt4OfMqESnLvG7+UywNjs/zjmdX0mn1wG7mZjlXfgh0DKo/MeWCW+gEQdPejCrBwIDAQAB -----END PUBLIC KEY-----"}],"callback":"http://localhost/","email":"[email protected]","apiProducts":"payment_apis"}'
payload: '{"name":"PISP_App","attributes":[{"name":"tppId","value":"12345"},{"name":"publicKey","value":"-----BEGIN PUBLIC KEY----- MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuZhaB6ciF8hzzHkv3tkl20LS8KfWgRb/V4I6pB9ADNPBNgrceSf+mLoIWxrRDgTSYqyYYXmj3Fy9B1mG4lpUvrClt4hHKaBvsRZKn4/r2dPxUo0ggI+ruxQaQoKf2v8sEJe6Sx7btBvBxTqOMlIxP1GDNYJICaXo8jsBeNVDtCeFP2e9QJUmNvYGY7IfB8vUqFFcHushNmKmdR5H6pUg/JOsheFyi41UT05Zu3FvMHBAJab4OnybOLrovCVshu3Q7BOFkQVkYF4HrD0IM4GDojGt4OfMqESnLvG7+UywNjs/zjmdX0mn1wG7mZjlXfgh0DKo/MeWCW+gEQdPejCrBwIDAQAB -----END PUBLIC KEY-----"}],"callback":"http://localhost/,https://api.enterprise.apigee.com/v1/o/{{ org }}/apimodels/payments-apis-v1-0/templateauths/PSUOAuth2Security/callback","email":"[email protected]","apiProducts":"payment_apis"}'
assignResponse:
- from: credentials.0.consumerKey
to: apiKey_PISP
Expand Down
18 changes: 11 additions & 7 deletions init_openapis.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
var mustache = require('mustache');
var path = require('path');
var fs = require('fs-extra');
var jwt = require('jsonwebtoken');
//var jwt = require('jsonwebtoken');
var prompt_lib = require('prompt');
var request = require('request');

Expand All @@ -32,7 +32,7 @@ var request = require('request');
node install_tmp.js
*/

var files_list = ['src/devportal/all/modules/custom/openbank_swagger/swaggers/accountsinfov2.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/authv2.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/userinfov2.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/opendata-locations.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/paymentsV2.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/opendata-products.json.template']
var files_list = ['src/devportal/all/modules/custom/openbank_swagger/swaggers/oauthv1-0.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/accountv1-0.json.template','src/devportal/all/modules/custom/openbank_swagger/swaggers/paymentv1-0.json.template','src/devportal/all/themes/dbank/js/smartdocsDynamic.js.template'];

var inject_object = {}

Expand Down Expand Up @@ -98,6 +98,10 @@ function post_prompt(err, results) {
}

inject_object.org = results['org'];
if(results['env'])
{
inject_object.env = results['env'];
}
var org = results['org']
var username = results['username'];
var password = results['password'];
Expand Down Expand Up @@ -131,12 +135,12 @@ function post_prompt(err, results) {



get_app_details('AISP_App_v2', edge_host, org, username, password, function (aisp_details) {
get_app_details('AISP_App', edge_host, org, username, password, function (aisp_details) {
secret_aisp = aisp_details.credentials[0].consumerSecret;
client_id_aisp = aisp_details.credentials[0].consumerKey;
redirect_uri_aisp = aisp_details.callbackUrl;

get_app_details('PISP_App_v2', edge_host, org, username, password, function (pisp_details) {
get_app_details('PISP_App', edge_host, org, username, password, function (pisp_details) {
secret_pisp = pisp_details.credentials[0].consumerSecret;
client_id_pisp = pisp_details.credentials[0].consumerKey;
redirect_uri_pisp = pisp_details.callbackUrl;
Expand All @@ -146,8 +150,8 @@ function post_prompt(err, results) {
inject_object.client_id_aisp = client_id_aisp;
inject_object.client_id_pisp = client_id_pisp;
inject_object.redirect_uri_pisp = redirect_uri_pisp;

get_app_details('Opendata_App_v2', edge_host, org, username, password, function (opendata_details) {
replace_variables(paths, inject_object);
/*get_app_details('Opendata_App_v2', edge_host, org, username, password, function (opendata_details) {
secret_openid = opendata_details.credentials[0].consumerSecret;
client_id_openid = opendata_details.credentials[0].consumerKey;
redirect_uri_openid = opendata_details.callbackUrl;
Expand All @@ -158,7 +162,7 @@ function post_prompt(err, results) {
replace_variables(paths, inject_object)
});
});*/

});

Expand Down
Loading

0 comments on commit ce4689c

Please sign in to comment.