forked from apigee/openbank
-
Notifications
You must be signed in to change notification settings - Fork 0
/
config.yml
241 lines (235 loc) · 14.9 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
resources:
- name: openbank_apis
type: solutions.api
properties:
inputs:
- name: org
prompt: Edge Org name
- name: username
prompt: Username
ifNotPresent: token
- name: password
prompt: Password
hidden: true
ifNotPresent: token
- name: env
prompt: Edge Org Environment
- name: usergrid_org
prompt: BaaS Org name
- name: usergrid_app
prompt: BaaS App name
- name: usergrid_client_id
prompt: BaaS Org Client Id
- name: usergrid_secret
prompt: BaaS Org Client Secret
- name: consentSessionKey
prompt: Enter Consent Session Key
- name: jwtSignKey
prompt: Enter Login App Key
configurations:
- env: test
baas_host: https://apibaas-trial.apigee.net
edge_host: https://api.enterprise.apigee.com
sms_endpoint: https://rest.nexmo.com/sms/json
- env : prod
baas_host: https://apibaas-trial.apigee.net
edge_host: https://api.enterprise.apigee.com
sms_endpoint: https://rest.nexmo.com/sms/json
edgeOrg:
script: gulpfile.js
basePath: .
subResources:
- name: baas_data_load
type: baasLoadData
items:
- name: accounts
file: setup/data/accounts.json
permissions: ['get,post,delete:accounts','get,post,delete:accounts/*','get,post,delete:accounts/**']
- name: accountsrequests
file: setup/data/accountsrequests.json
permissions: ['get,post,put,delete:accountsrequests','get,post,put,delete:accountsrequests/*','get,post,put,delete:accountsrequests/**']
- name: payments
permissions: ['get,post,delete:payments','get,post,delete:payments/*','get,post,delete:payments/**']
- name: payment-submissions
permissions: ['get,post,put,delete:payment-submissions','get,post,put,delete:payment-submissions/*','get,post,put,delete:payment-submissions/**']
- name: beneficiaries
file: setup/data/beneficiaries.json
permissions: ['get,post,delete:beneficiaries','get,post,delete:beneficiaries/*','get,post,delete:beneficiaries/**']
- name: customers
file: setup/data/customers.json
permissions: ['get,post,delete:customers','get,post,delete:customers/*','get,post,delete:customers/**']
- name: directdebits
file: setup/data/directdebits.json
permissions: ['get,post,delete:directdebits','get,post,delete:directdebits/*','get,post,delete:directdebits/**']
- name: standingorders
file: setup/data/standingorders.json
permissions: ['get,post,delete:standingorders','get,post,delete:standingorders/*','get,post,delete:standingorders/**']
- name: transactions
file: setup/data/transactions.json
permissions: ['get,post,delete:transactions','get,post,delete:transactions/*','get,post,delete:transactions/**']
- name: products
file: setup/data/products.json
permissions: ['get,post,delete:products','get,post,delete:products/*','get,post,delete:products/**']
- name: id-tokens
permissions: ['get,post,delete:id-tokens','get,post,delete:id-tokens/*','get,post,delete:id-tokens/**']
- name: users
file: setup/data/users.json
permissions: ['get,post,delete:users','get,post,delete:users/*','get,post,delete:users/**']
- name: consents
file: setup/data/consents.json
permissions: ['get,post,delete:consents','get,post,delete:consents/*','get,post,delete:consents/**']
- name: cacheResources
type: cache
items:
- name: sms-token-cache
payload: '{ "name": "sms-token-cache"}'
- name: nonce-cache
payload: '{ "name": "nonce-cache"}'
- name: message_kvm
type: kvm
items:
- name: BankKVM
payload: '{ "name" : "BankKVM", "entry" : [ { "name" : "privateKey", "value" : "-----BEGIN RSA PRIVATE KEY----- MIIEpAIBAAKCAQEA2gHHPkSDSlbXJfGujn9Qgq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cAY5XC/iUbyhKs4GIMglFXz6Gg0l0AcInad3XLZzkwsdjv7X5jGvLvNneWKTleCyOTin+QduGSmli284f6XLDUI4XpL3Ko3uIoJwiWn+DLcCgYAWhUHv7jgzvkOFmEq+AlQcpI7x+1zMyXUjy1CLMkl7yb0BS4J9XuXhPgAEg0ebT66vlLe1wXDz2zUJNY/zDIlmOK8AOGqyLfAr6cQCywp2rMxKszvP/UjR09od5tbeOwsPF3wrS5/UOOd486tvjwCv9LRSRN+hwIf37yYyvhd7OQKBgQDTOPDOyZCK2OHkiDuNJA04E2XycnfHPJ5H65ZeqbHQTXuG2GCvj3P7G2ICqc1A4wcCPrTAG4CRm5yC6rYFNH457iXvgHTX9PCZqX7y07yI6PrGmfz9M8sTV09u2LNIVEPIHSg6S8gKNH2lvD45LVNNB013KU9LOlM4jfhFycFD/A== -----END RSA PRIVATE KEY-----" } ] , "encrypted": "true"}'
- name: replaceorgvalues
type: configSubstitutions
items:
- name: baasBasePath
filePaths: ['src/gateway/user-management/target/apiproxy/targets/default.xml','src/gateway/customer-management/target/apiproxy/targets/default.xml','src/gateway/accounts-connector/target/apiproxy/policies/Assign-Target-URL.xml']
value: '{{ baas_host }}/{{ usergrid_org }}/{{ usergrid_app }}'
- name: baasURI
filePaths: ['src/gateway/consent-management/target/apiproxy/resources/node/package.json','src/gateway/payments-connector/target/apiproxy/resources/node/package.json']
value: '{{ baas_host }}'
- name: baasOrg
filePaths: ['src/gateway/consent-management/target/apiproxy/resources/node/package.json','src/gateway/payments-connector/target/apiproxy/resources/node/package.json']
value: '{{ usergrid_org }}'
- name: baasApp
filePaths: ['src/gateway/consent-management/target/apiproxy/resources/node/package.json','src/gateway/payments-connector/target/apiproxy/resources/node/package.json']
value: '{{ usergrid_app }}'
- name: baasClientId
filePaths: ['src/gateway/consent-management/target/apiproxy/resources/node/package.json','src/gateway/payments-connector/target/apiproxy/resources/node/package.json']
value: '{{ usergrid_client_id }}'
- name: baasClientSecret
filePaths: ['src/gateway/consent-management/target/apiproxy/resources/node/package.json','src/gateway/payments-connector/target/apiproxy/resources/node/package.json']
value: '{{ usergrid_secret }}'
- name: edgeBasePath
filePaths: ['src/gateway/login-app/target/apiproxy/resources/node/config.json']
value: 'https://{{ org }}-{{ env }}.apigee.net'
- name: sms_endpoint
filePaths: ['src/gateway/sms-token/target/apiproxy/targets/confirmation.xml','src/gateway/sms-token/target/apiproxy/targets/default.xml']
value: '{{ sms_endpoint }}'
- name: jwtSignKey
filePaths: ['src/gateway/login-app/target/apiproxy/resources/node/config.json']
value: '{{ jwtSignKey }}'
- name: bank_apis
type: proxy
items:
- name: accounts-connector
apiName: AccountsOBv1.0Connector
- name: sms-token
apiName: SmsTokenOBv1.0
- name: consent-management
apiName: ConsentManagementOBv1.0
- name: user-management
apiName: UserManagementOBv1.0
- name: customer-management
apiName: CustomerManagementOBv1.0
- name: login-app
apiName: LoginAppOBv1.0
- name: payments-connector
apiName: PaymentsOBv1.0Connector
- name: developers
type: developer
items:
- payload: '{"email":"openbank@apigee.net", "firstName":"OpenBank","lastName":"Developer","userName":"openbank"}'
email: openbank@apigee.net
- name: apiProducts
type: product
items:
- payload: '{"approvalType":"auto", "attributes":[{"name":"access","value":"private"}], "displayName":"Internal Consent APIs","name":"internal_apis","environments":["test","prod"],"scopes":[]}'
name: internal_apis
- name: developerApps
type: app
items:
- name: internal_app
payload: '{"name":"internal_app","callback":"http://localhost/","email":"openbank@apigee.net","apiProducts":"internal_apis"}'
assignResponse:
- from: credentials.0.consumerKey
to: apiKey_IA
- name: replace_consent_app_key
type: configSubstitutions
items:
- name: internalAppKey
filePaths: ['src/gateway/consent-app/target/apiproxy/resources/node/config.json','src/gateway/accounts/target/apiproxy/policies/Assign-APIKey-Header.xml','src/gateway/accounts/target/apiproxy/policies/Fetch-Account-Consent.xml','src/gateway/accounts/target/apiproxy/policies/Get-Acc-Req-Data.xml','src/gateway/accounts/target/apiproxy/policies/Update-Access-Count.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Update-Account-Request.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Update-Payment-Request.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Validate-Account-Request.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Validate-Payment-Request.xml','src/gateway/payments/target/apiproxy/policies/Assign-APIKey-Header.xml','src/gateway/payments/target/apiproxy/policies/Service-Callout-Validate-Payment-Request-Status.xml','src/gateway/payments/target/apiproxy/policies/Service-Callout-Fetch-and-Validate-Consent.xml']
value: '{{ apiKey_IA }}'
- name: edgeBasePath
filePaths: ['src/gateway/consent-app/target/apiproxy/resources/node/config.json','src/gateway/accounts/target/apiproxy/policies/Fetch-Account-Consent.xml','src/gateway/accounts/target/apiproxy/policies/Get-Acc-Req-Data.xml','src/gateway/accounts/target/apiproxy/policies/Update-Access-Count.xml','src/gateway/accounts/target/apiproxy/targets/default.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Update-Account-Request.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Update-Payment-Request.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Validate-Account-Request.xml','src/gateway/oauth/target/apiproxy/policies/Service-Callout-Validate-Payment-Request.xml','src/gateway/oauth/target/apiproxy/targets/default.xml','src/gateway/payments/target/apiproxy/policies/Service-Callout-Validate-Payment-Request-Status.xml','src/gateway/payments/target/apiproxy/policies/Service-Callout-Fetch-and-Validate-Consent.xml','src/gateway/payments/target/apiproxy/targets/default.xml']
value: 'https://{{ org }}-{{ env }}.apigee.net'
- name: consentSessionKey
filePaths: ['src/gateway/consent-app/target/apiproxy/resources/node/config.json']
value: '{{ consentSessionKey }}'
- name: jwtSignKey
filePaths: ['src/gateway/consent-app/target/apiproxy/resources/node/config.json']
value: '{{ jwtSignKey }}'
- name: baasBasePath
filePaths: ['src/gateway/oauth/target/apiproxy/policies/Service-Callout-Create-ID-token.xml']
value: '{{ baas_host }}/{{ usergrid_org }}/{{ usergrid_app }}'
- name: deploy_remaining_apis
type: proxy
items:
- name: oauth
apiName: OauthOBv1.0
- name: consent-app
apiName: ConsentAppOBv1.0
- name: accounts
apiName: AccountsOBv1.0
- name: payments
apiName: PaymentsOBv1.0
- name: remainingApiProducts
type: product
items:
- payload: '{"approvalType":"auto", "displayName":"Account APIs","name":"account_apis","environments":["test","prod"],"scopes":["accounts","openid"], "proxies":["oauth", "accounts"]}'
name: account_apis
- payload: '{"approvalType":"auto", "displayName":"Payments APIs","name":"payment_apis","environments":["test","prod"],"scopes":["payments","openid"], "proxies":["oauth", "payments"]}'
name: payment_apis
- name: remainingDeveloperApps
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/,https://api.enterprise.apigee.com/v1/o/{{ org }}/apimodels/accounts-apis-v1-0/templateauths/PSUOAuth2Security/callback","email":"openbank@apigee.net","apiProducts":"account_apis"}'
assignResponse:
- from: credentials.0.consumerKey
to: apiKey_AISP
- from: credentials.0.consumerSecret
to: apiSecret_AISP
- 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/,https://api.enterprise.apigee.com/v1/o/{{ org }}/apimodels/payments-apis-v1-0/templateauths/PSUOAuth2Security/callback","email":"openbank@apigee.net","apiProducts":"payment_apis"}'
assignResponse:
- from: credentials.0.consumerKey
to: apiKey_PISP
- from: credentials.0.consumerSecret
to: apiSecret_PISP
- from: appId
to: appId_PISP
- name: copyTestConfigTemplate
type: util
items:
- action: copy
from: test/config.orig
to: test/config.json
- name: replace_test_keys
type: configSubstitutions
items:
- name: keyAISP
filePaths: ['test/config.json']
value: '{{ apiKey_AISP }}'
- name: keyPISP
filePaths: ['test/config.json']
value: '{{ apiKey_PISP }}'
- name: edgeBasePath
filePaths: ['test/config.json']
value: '{{ org }}-{{ env }}.apigee.net'
- name: internalAppKey
filePaths: ['test/config.json']
value: '{{ apiKey_IA }}'