Skip to content

Commit

Permalink
Release 4.5.1 (#130)
Browse files Browse the repository at this point in the history
* allow newer pgsql versions (#51)

* feat: support for PostgreSQL 15

* feat: psql 15 integration

---------

Co-authored-by: Nedim Akar <[email protected]>

* Allow product name to be changed (#25)

Co-authored-by: Neil MacDougall <[email protected]>

* Initial support for CA Certificates for endpoints (#21)

* Adapt "Initial support for CA Certificates for endpoints"

* Add frontend changes for ca-certs

* use correct attribute

* fix pgsql tests by adding empty string for ca_cert

* fix tests by adding the new columns "enabled" (tokens) and "cacert" (cnsis) in various locations for the test suite

* implement requested changes

* fix typo

* update dependencies to address cves (#88)

* upgrade golang/x/net to fix CVE-2023-39325

* address https://github.com/anynines/stratos/security/dependabot/170

* Address https://github.com/anynines/stratos/security/dependabot/323

* Address https://github.com/anynines/stratos/security/dependabot/321

* run go mod tidy

* run go mod tidy

* Upgrade archiver for https://github.com/anynines/stratos/security/dependabot/320

* Upgrade archiver in main go.mod

* Update golang/x libs everywhere, tidy up plugins/monocular module file

* upgrade grpc again

* Bump word-wrap from 1.2.3 to 1.2.4 in /electron (#9)

Bumps [word-wrap](https://github.com/jonschlinkert/word-wrap) from 1.2.3 to 1.2.4.
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.4)

---
updated-dependencies:
- dependency-name: word-wrap
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump debug in /website (#41)

Bumps  and [debug](https://github.com/debug-js/debug). These dependencies needed to be updated together.

Updates `debug` from 4.1.1 to 4.3.4
- [Release notes](https://github.com/debug-js/debug/releases)
- [Commits](debug-js/debug@4.1.1...4.3.4)

Updates `debug` from 3.2.6 to 4.3.4
- [Release notes](https://github.com/debug-js/debug/releases)
- [Commits](debug-js/debug@4.1.1...4.3.4)

---
updated-dependencies:
- dependency-name: debug
  dependency-type: indirect
- dependency-name: debug
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Deduplicate column names in tests (#75)

* add samber/lo

* add helper functions to datastore to centralize column name management

* add test helper funtions to generate mock rows and predefined entities

* switch tests over to helper functions

* cover oauth tests as much as possible

* add some more missing row addons

* Fix columns

* Switch CNSI tests over to actual cnsi records; also add expired tokens left out during first refactor

* fix column name without underscore

* Remove legacy GO111MODULE flag and update swag binary (#106)

* Remove legacy GO111MODULE flag and update swag binary

* Add fix for type resolution

* INT-3729 - Stratos - Website: Update Docusaurus to nearest stable (#111)

* Working 2.0.1 🎉

* Fix broken links

* fix small mistake with sed

* fix sed expression

* fix indent

* upgrade docusaurus to 2.4.3 (#112)

* Upgrade to docusaurus v3 (#119)

* Add 'all versions' to drop down

* Upgrade versions to docusaurus v3

* Make the theme switcher button white

* Properly escape the hint on commit signing

* Add workarounds for v3 upgrade

* fix indent

* Add context on why workaround is necessary

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Nedim Akar <[email protected]>
Co-authored-by: Nedim Akar <[email protected]>
Co-authored-by: Matthias Folz <[email protected]>
Co-authored-by: Neil MacDougall <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
  • Loading branch information
6 people authored Mar 8, 2024
1 parent e10a09b commit 1e90b30
Show file tree
Hide file tree
Showing 115 changed files with 23,633 additions and 13,110 deletions.
8 changes: 4 additions & 4 deletions build/bk-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,17 +34,17 @@ go env

# Need to install swag in both cases
echo "Generating OpenAPI documentation..."
go install github.com/swaggo/swag/cmd/swag@v1.6.7
swag init
go install github.com/swaggo/swag/cmd/swag@v1.16.2
swag init --parseDependency

if [ "${ACTION}" == "build" ]; then
echo "Building backend ..."
echo "Building version: ${VERSION}"
GO111MODULE=on go build -ldflags -X=main.appVersion=${VERSION}
go build -ldflags -X=main.appVersion=${VERSION}
echo "Build complete ..."
else
echo "Running backend tests ..."
GO111MODULE=on go test ./... -v -count=1 -coverprofile=coverage.txt -covermode=atomic
go test ./... -v -count=1 -coverprofile=coverage.txt -covermode=atomic
fi

popd > /dev/null
Expand Down
6 changes: 3 additions & 3 deletions electron/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion src/frontend/packages/core/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ export class AppModule {
private store: Store<GeneralEntityAppState>,
eventService: GlobalEventService,
private userFavoriteManager: UserFavoriteManager,
ech: EntityCatalogHelper
ech: EntityCatalogHelper,
customizationService: CustomizationService,
) {
EntityCatalogHelpers.SetEntityCatalogHelper(ech);

Expand Down Expand Up @@ -254,6 +255,9 @@ export class AppModule {
});
}
);

customizationService.setAppNameFromTitle();
customizationService.get().appName = 'Zuun';
}

private syncFavorite(favorite: UserFavorite<IFavoriteMetadata>, entities: GeneralRequestDataState) {
Expand Down
7 changes: 7 additions & 0 deletions src/frontend/packages/core/src/core/customizations.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface CustomizationsMetadata {
hasEula?: boolean;
copyright?: string;
logoText?: string;
appName?: string;
aboutInfoComponent?: any;
supportInfoComponent?: any;
noEndpointsComponent?: any;
Expand All @@ -22,4 +23,10 @@ export class CustomizationService {

set = (cm: CustomizationsMetadata) => this.customizationMetadata = cm;
get = () => this.customizationMetadata;

setAppNameFromTitle() {
if (!this.customizationMetadata.appName) {
this.customizationMetadata.appName = document.title || 'Stratos';
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<app-stratos-title></app-stratos-title>
<div class="about-page">
<div class="about-page__version">{{ (versionNumber$ | async) }}</div>
<div class="about-page__title">Stratos provides an easy-to-use web-based UI that allows developers and administrators to manage their applications and Cloud Foundry deployments</div>
<div class="about-page__title"><app-product-name></app-product-name> provides an easy-to-use web-based UI that allows developers and administrators to manage their applications and Cloud Foundry deployments</div>
</div>
</mat-card>
<ng-template #aboutInfoContainer></ng-template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>API Keys</h1>
<mat-icon>vpn_key</mat-icon>New API Key
</mat-card-header>
<mat-card-content>
<p>Your API Key has been successfully created. Use the following information to connect to Stratos.</p>
<p>Your API Key has been successfully created. Use the following information to connect to <app-product-name></app-product-name>.</p>
<p><i>Please safely record these details, there is no later way to view them</i></p>
<ul>
<li id="apikey-secret">Secret: {{keyDetails.secret}}</li>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>Restore Endpoints</h1>
<div *ngIf="!!service.unparsableFileContent || !(service.validDb$ | async)" class="file-step__error">
<div *ngIf="!service.unparsableFileContent && !(service.validDb$ | async)" class="file-step__chunk">
<p>
<mat-icon>warning</mat-icon> The database version of Stratos
<mat-icon>warning</mat-icon> The database version of <app-product-name></app-product-name>
(<code>{{service.currentDbVersion$ | async}}</code>) and the backup
(<code>{{file.content.dbVersion}}</code>) are different. Restoring this file may have adverse affects.
</p>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div [formGroup]="formGroup">
<div formGroupName="authValues" class="sso-auth__form">
<p>You will be redirected to the Single Sign-On UI for this endpoint and returned to Stratos upon completion.</p>
<p>You will be redirected to the Single Sign-On UI for this endpoint and returned to <app-product-name></app-product-name> upon completion.</p>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@ <h1 class="create-endpoint__section-title">{{endpoint.definition.label}} Informa
formControlName="createSystemEndpointField" (change)="toggleCreateSystemEndpoint()"
[ngClass]="{'hide': fixedUrl, 'show': !fixedUrl}">Create a system endpoint (visible to all users)
</mat-checkbox>
<mat-checkbox matInput name="skipSll" formControlName="skipSllField"
[ngClass]="{'hide': fixedUrl, 'show': !fixedUrl}">Skip SSL validation for the
endpoint
</mat-checkbox>
<mat-checkbox [disabled]="showCACertField" matInput name="skipSSL" formControlName="skipSSLField">Skip SSL validation for the endpoint</mat-checkbox>
<mat-checkbox matInput (change)="toggleCACertField()">Use a CA Certificate for the endpoint</mat-checkbox>
<div [ngClass]="{'create-endpoint__shown': showCACertField}" class="create-endpoint__advanced" spellcheck=false>
<span class="create-endpoint__cacert-title">Specify CA Certificate:</span>
<textarea rows="10" class="create-endpoint__cacert" matInput formControlName="caCertField" name="caCert"></textarea>
</div>
<div [ngClass]="{'hide': !showAdvancedFields, 'show': showAdvancedFields}" class="create-endpoint__section">
<mat-checkbox matInput (change)="toggleAdvancedOptions()">Show Advanced Options</mat-checkbox>
<div [ngClass]="{'create-endpoint__shown': showAdvancedOptions}" class="create-endpoint__advanced">
Expand All @@ -47,7 +49,7 @@ <h1>Advanced Options</h1>
</mat-checkbox>
<div *ngIf="!!registerForm.controls.ssoAllowedField.value">
<p>
Please ensure that you have added the Stratos SSO Callback URL shown below to the client's 'redirect_uri'.
Please ensure that you have added the <app-product-name></app-product-name> SSO Callback URL shown below to the client's 'redirect_uri'.
</p>
<pre>{{clientRedirectURI}}</pre>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
$checkbox-margin: 30px;

:host {
height: 100%;
width: 100%;
}

mat-checkbox {
padding-top: 40px;
padding-top: $checkbox-margin;
}

form.stepper-form {
Expand All @@ -20,14 +22,14 @@ form.stepper-form {

.create-endpoint {
&__section {
margin-top: 40px;
margin-top: $checkbox-margin;

&-title {
font-size: 16px;
}
}
&__sso {
margin-top: 40px;
margin-top: $checkbox-margin;
}
&__advanced {
display: flex;
Expand All @@ -46,6 +48,16 @@ form.stepper-form {
&__shown {
height: auto;
}
&__cacert-title {
font-size: 14px;
margin: 10px 0;
}
&__cacert {
font-family: "Source Code Pro";
font-size: 14px;
line-break: anywhere;
max-width: 580px;
}
}

.hide {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ export class CreateEndpointCfStep1Component extends CreateEndpointHelperComponen
endpoint: StratosCatalogEndpointEntity;
show = false;

showCACertField = false;
showAdvancedOptions = false;
lastSkipSSLValue = false;

constructor(
private fb: UntypedFormBuilder,
Expand All @@ -71,12 +73,13 @@ export class CreateEndpointCfStep1Component extends CreateEndpointHelperComponen
this.registerForm = this.fb.group({
nameField: ['', [Validators.required]],
urlField: ['', [Validators.required]],
skipSllField: [false, []],
skipSSLField: [false, []],
ssoAllowedField: [false, []],
// Optional Client ID and Client Secret
clientIDField: ['', []],
clientSecretField: ['', []],
createSystemEndpointField: [true, []],
caCertField: ['', []],
});

const epType = getIdFromRoute(activatedRoute, 'type');
Expand All @@ -90,16 +93,24 @@ export class CreateEndpointCfStep1Component extends CreateEndpointHelperComponen

onNext: StepOnNextFunction = () => {
const { subType, type } = this.endpoint.getTypeAndSubtype();

// SSL Setttings
let sslAllow = this.registerForm.value.skipSSLField;
if (this.showCACertField) {
sslAllow = false;
}

return stratosEntityCatalog.endpoint.api.register<ActionState>(
type,
subType,
this.registerForm.value.nameField,
this.registerForm.value.urlField,
this.registerForm.value.skipSllField,
sslAllow,
this.registerForm.value.clientIDField,
this.registerForm.value.clientSecretField,
this.registerForm.value.ssoAllowedField,
this.registerForm.value.createSystemEndpointField,
this.registerForm.value.caCertField,
).pipe(
pairwise(),
filter(([oldVal, newVal]) => (oldVal.busy && !newVal.busy)),
Expand Down Expand Up @@ -150,6 +161,16 @@ export class CreateEndpointCfStep1Component extends CreateEndpointHelperComponen
this.showAdvancedOptions = !this.showAdvancedOptions;
}

toggleCACertField() {
this.showCACertField = !this.showCACertField;
if (this.showCACertField) {
this.lastSkipSSLValue = this.registerForm.value.skipSSLField;
this.registerForm.controls.skipSSLField.setValue(false);
} else {
this.registerForm.controls.skipSSLField.setValue(this.lastSkipSSLValue);
}
}

toggleCreateSystemEndpoint() {
// wait a tick for validators to adjust to new data in the directive
setTimeout(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,15 @@ <h1 class="edit-endpoint__section-title">{{definition.label}} Information</h1>
</mat-form-field>
<mat-checkbox matInput name="skipSSL" formControlName="skipSSL">Skip SSL validation for the endpoint
</mat-checkbox>
<mat-checkbox checked="showCACertField" matInput (change)="toggleCACertField()">Use a CA Certificate for the endpoint</mat-checkbox>
<div [ngClass]="{'edit-endpoint__shown': showCACertField}" class="edit-endpoint__advanced" spellcheck=false>
<span class="edit-endpoint__cacert-title">Specify CA Certificate:</span>
<textarea rows="10" class="edit-endpoint__cacert" matInput formControlName="caCert" name="caCert"></textarea>
</div>
<div *ngIf="showAdvancedFields" class="edit-endpoint__section">
<h1 class="edit-endpoint__section-title">Advanced Information (Optional)</h1>

<mat-checkbox matInput name="setClientInfo" formControlName="setClientInfo">Update Client ID and Client Secret
</mat-checkbox>

<mat-form-field>
<input matInput id="client_id" name="client_id" formControlName="clientID" placeholder="Client ID" required>
<mat-error *ngIf="clientID.errors && clientID.errors.required">Client ID is required</mat-error>
Expand All @@ -36,7 +39,7 @@ <h1 class="edit-endpoint__section-title">Advanced Information (Optional)</h1>
</mat-checkbox>
<div *ngIf="editEndpoint.value.allowSSO">
<p>
Please ensure that you have added the Stratos SSO Callback URL shown below to the client's 'redirect_uri'.
Please ensure that you have added the <app-product-name></app-product-name> SSO Callback URL shown below to the client's 'redirect_uri'.
</p>
<pre>{{clientRedirectURI}}</pre>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,53 @@
$checkbox-margin: 30px;

:host {
flex: 1;
}

mat-checkbox {
padding-top: 40px;
padding-top: $checkbox-margin;
}

form.stepper-form {
max-width: unset;
mat-form-field,
mat-checkbox {
max-width: 450px;
}
P {
max-width: unset;
}
}

.edit-endpoint {
&__section {
margin-top: 40px;
margin-top: $checkbox-margin;

&-title {
font-size: 16px;
}
}
&__sso {
margin-top: 40px;
margin-top: $checkbox-margin;
}
&__advanced {
display: flex;
flex-direction: column;
height: 0;
margin-left: 24px;
overflow: hidden;
}
&__cacert-title {
font-size: 14px;
margin: 10px 0;
}
&__cacert {
font-family: "Source Code Pro";
font-size: 14px;
line-break: anywhere;
max-width: 580px;
}
&__shown {
height: auto;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ export class EditEndpointStepComponent implements OnDestroy, IStepperStep {
formChangeSub: Subscription;
setClientInfo = false;
show = false;
showCACertField = false;
lastSkipSSLValue = false;

constructor(
activatedRoute: ActivatedRoute,
Expand Down Expand Up @@ -90,6 +92,9 @@ export class EditEndpointStepComponent implements OnDestroy, IStepperStep {
first()
).subscribe(endpoint => {
this.setAdvancedFields(endpoint);
this.lastSkipSSLValue = endpoint.skip_ssl_validation;
this.showCACertField = !!endpoint.caCert;
this.updateSSLFieldCheckbox();
this.editEndpoint.setValue({
name: endpoint.name,
url: getFullEndpointApiUrl(endpoint),
Expand Down Expand Up @@ -130,17 +135,20 @@ export class EditEndpointStepComponent implements OnDestroy, IStepperStep {
return this.endpoint$.pipe(
first(),
switchMap(endpoint => {
const caCert = this.showCACertField ? this.editEndpoint.value.caCert : undefined;
const skipSSL = this.showCACertField ? false : this.editEndpoint.value.skipSSL;
return stratosEntityCatalog.endpoint.api.update<ActionState>(
this.endpointID,
this.endpointID, {
endpointType: endpoint.cnsi_type,
id: this.endpointID,
name: this.editEndpoint.value.name,
skipSSL: this.editEndpoint.value.skipSSL,
skipSSL,
setClientInfo: this.editEndpoint.value.setClientInfo,
clientID: this.editEndpoint.value.clientID,
clientSecret: this.editEndpoint.value.clientSecret,
allowSSO: this.editEndpoint.value.allowSSO,
caCert,
}
).pipe(
pairwise(),
Expand Down Expand Up @@ -170,4 +178,22 @@ export class EditEndpointStepComponent implements OnDestroy, IStepperStep {
this.endpointTypeSupportsSSO = isCloudFoundry;
}

toggleCACertField() {
this.showCACertField = !this.showCACertField;
if (this.showCACertField) {
this.lastSkipSSLValue = this.editEndpoint.value.skipSSL;
this.editEndpoint.controls.skipSSL.setValue(false);
} else {
this.editEndpoint.controls.skipSSL.setValue(this.lastSkipSSLValue);
}
this.updateSSLFieldCheckbox();
}

private updateSSLFieldCheckbox() {
if (this.showCACertField) {
this.editEndpoint.controls.skipSSL.disable();
} else {
this.editEndpoint.controls.skipSSL.enable();
}
}
}
Loading

0 comments on commit 1e90b30

Please sign in to comment.