@sap-ux/cf-deploy-config-writer 1.0.21 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -87,12 +87,6 @@ export declare class MtaConfig {
87
87
  * @param appendSrvApi If `srv-api` should be appended, typically used for CAP flows (default: true)
88
88
  */
89
89
  private updateServerModule;
90
- /**
91
- * Add a managed XSUAA service to the MTA.
92
- *
93
- * @private
94
- */
95
- private addManagedUAAWithSecurity;
96
90
  /**
97
91
  * Verify if the destination is valid and if WebIDEUsage is set to ODATA_GENERIC or ODATA_ABAP.
98
92
  *
@@ -153,7 +153,7 @@ export class MtaConfig {
153
153
  }
154
154
  async addUaa() {
155
155
  const resource = {
156
- name: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-uaa`,
156
+ name: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-auth`,
157
157
  type: 'org.cloudfoundry.managed-service',
158
158
  parameters: {
159
159
  service: 'xsuaa',
@@ -162,12 +162,15 @@ export class MtaConfig {
162
162
  'service-name': `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-xsuaa-service`,
163
163
  config: {
164
164
  xsappname: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-\${org}-\${space}`,
165
- 'tenant-mode': 'dedicated'
165
+ 'tenant-mode': 'dedicated',
166
+ 'oauth2-configuration': {
167
+ 'credential-types': ['binding-secret', 'x509']
168
+ }
166
169
  }
167
170
  }
168
171
  };
169
172
  await this.mta?.addResource(resource);
170
- this.resources.set('xsuaa', resource);
173
+ this.resources.set(ManagedXSUAA, resource);
171
174
  this.dirty = true;
172
175
  }
173
176
  async addHtml5Runtime() {
@@ -323,31 +326,6 @@ export class MtaConfig {
323
326
  this.dirty = true;
324
327
  }
325
328
  }
326
- /**
327
- * Add a managed XSUAA service to the MTA.
328
- *
329
- * @private
330
- */
331
- async addManagedUAAWithSecurity() {
332
- this.log?.debug(t('debug.addXsuaaService'));
333
- const resource = {
334
- name: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-uaa`,
335
- type: 'org.cloudfoundry.managed-service',
336
- parameters: {
337
- path: './xs-security.json',
338
- service: 'xsuaa',
339
- 'service-name': `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-xsuaa-service`,
340
- 'service-plan': 'application',
341
- config: {
342
- xsappname: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}-\${org}-\${space}`,
343
- 'tenant-mode': 'dedicated'
344
- }
345
- }
346
- };
347
- await this.mta?.addResource(resource);
348
- this.resources.set(ManagedXSUAA, resource);
349
- this.dirty = true;
350
- }
351
329
  /**
352
330
  * Verify if the destination is valid and if WebIDEUsage is set to ODATA_GENERIC or ODATA_ABAP.
353
331
  *
@@ -689,7 +667,7 @@ export class MtaConfig {
689
667
  */
690
668
  async addStandaloneRouter(fromServerGenerator = false) {
691
669
  this.log?.debug(t('debug.addingRouter', { routerType: RouterModuleType.Standard }));
692
- if (!this.resources.has('xsuaa')) {
670
+ if (!this.resources.has(ManagedXSUAA)) {
693
671
  await this.addUaa();
694
672
  }
695
673
  if (!this.resources.has('html5-apps-repo:app-runtime')) {
@@ -699,7 +677,7 @@ export class MtaConfig {
699
677
  await this.addDestinationResource();
700
678
  }
701
679
  const appRuntimeName = this.resources.get('html5-apps-repo:app-runtime')?.name;
702
- const xsuaaName = this.resources.get('xsuaa')?.name;
680
+ const xsuaaName = this.resources.get(ManagedXSUAA)?.name;
703
681
  const destinationName = this.resources.get('destination')?.name;
704
682
  if (destinationName && xsuaaName && appRuntimeName) {
705
683
  const router = {
@@ -913,7 +891,7 @@ export class MtaConfig {
913
891
  */
914
892
  async addAppFrontAppRouter() {
915
893
  if (!this.resources.has(ManagedXSUAA)) {
916
- await this.addManagedUAAWithSecurity();
894
+ await this.addUaa();
917
895
  }
918
896
  await this.updateServiceName('xsuaa', ManagedXSUAA);
919
897
  if (!this.resources.has(ManagedAppFront)) {
@@ -964,7 +942,7 @@ export class MtaConfig {
964
942
  await this.addDestinationResource(true);
965
943
  }
966
944
  if (!this.resources.has(ManagedXSUAA)) {
967
- await this.addManagedUAAWithSecurity();
945
+ await this.addUaa();
968
946
  }
969
947
  if (!this.resources.has(HTML5RepoHost)) {
970
948
  await this.addHtml5Host();
@@ -1021,7 +999,7 @@ export class MtaConfig {
1021
999
  },
1022
1000
  {
1023
1001
  Authentication: 'OAuth2UserTokenExchange',
1024
- Name: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}_uaa`,
1002
+ Name: `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}_auth`,
1025
1003
  ServiceInstanceName: managedXSUAAServiceName,
1026
1004
  ServiceKeyName: `${managedXSUAAName}-key`,
1027
1005
  'sap.cloud.service': `${this.prefix?.slice(0, MAX_MTA_PREFIX_LENGTH)}`
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sap-ux/cf-deploy-config-writer",
3
3
  "description": "Add or amend Cloud Foundry and ABAP deployment configuration for SAP projects",
4
- "version": "1.0.21",
4
+ "version": "1.1.0",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/SAP/open-ux-tools.git",
@@ -30,10 +30,10 @@
30
30
  "mem-fs": "2.1.0",
31
31
  "mem-fs-editor": "9.4.0",
32
32
  "hasbin": "1.2.3",
33
- "@sap-ux/project-access": "2.1.10",
34
33
  "@sap-ux/yaml": "1.0.2",
35
34
  "@sap-ux/btp-utils": "2.0.6",
36
35
  "@sap-ux/logger": "1.0.3",
36
+ "@sap-ux/project-access": "2.1.10",
37
37
  "@sap-ux/ui5-config": "1.0.7",
38
38
  "@sap-ux/nodejs-utils": "1.0.9"
39
39
  },