Skip to content

Commit

Permalink
Merge pull request #682 from energywebfoundation/develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jrhender authored Feb 6, 2025
2 parents b3e7e66 + 9dda0db commit a9b5e17
Show file tree
Hide file tree
Showing 19 changed files with 394 additions and 124 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Build and deploy

on:
push:
branches: [ develop, master, release ]
branches: [ develop, release ]
paths-ignore:
- 'devops/**'
workflow_dispatch:
Expand Down Expand Up @@ -44,12 +44,6 @@ jobs:
echo "IMAGE_TAG=$(uuidgen)" >> $GITHUB_OUTPUT
echo "TAG_DRY_RUN=true" >> $GITHUB_OUTPUT
echo "PUSH_DOCKER=true" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/master" ]; then
echo "ENVIRONMENT=staging" >> $GITHUB_OUTPUT
echo "PRERELEASE=true" >> $GITHUB_OUTPUT
echo "IMAGE_TAG=staging" >> $GITHUB_OUTPUT
echo "TAG_DRY_RUN=false" >> $GITHUB_OUTPUT
echo "PUSH_DOCKER=true" >> $GITHUB_OUTPUT
elif [ "${{ github.ref }}" = "refs/heads/release" ]; then
echo "ENVIRONMENT=prod" >> $GITHUB_OUTPUT
echo "PRERELEASE=false" >> $GITHUB_OUTPUT
Expand All @@ -76,16 +70,15 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
release_branches: release
pre_release_branches: master # these branches will produce pre-release tag (eg. v0.1.2-beta.0)
append_to_pre_release_tag: beta
custom_release_rules: major:major:Major Changes,minor:minor:Minor Changes,chore:patch:Chores
dry_run: ${{ needs.configure.outputs.TAG_DRY_RUN }} # pushes to develop won't trigger tagging

- name: Create a GitHub release
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/release'
if: github.ref == 'refs/heads/release'
uses: ncipollo/[email protected]
with:
prerelease: ${{ needs.configure.outputs.PRERELEASE }} # master branch will create a pre-release
prerelease: ${{ needs.configure.outputs.PRERELEASE }}
tag: ${{ steps.tag_version.outputs.new_tag }}
name: Release ${{ steps.tag_version.outputs.new_tag }}
body: ${{ steps.tag_version.outputs.changelog }}
Expand Down Expand Up @@ -124,7 +117,7 @@ jobs:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}

# When running on develop branch we want to tag Docker images with unique id and branch name only.
# When running on master and release we're adding sem ver and latest (for release) tags too.
# When running on release we're adding sem ver and latest (for release) tags too.
- name: Setup Docker tags
id: tags
run: |
Expand Down
2 changes: 1 addition & 1 deletion devops/dev/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ appVersion: "1.0"

dependencies:
- name: iam-cache-server-helm
version: 1.2.0
version: 1.3.0
repository: "oci://984870885661.dkr.ecr.us-west-2.amazonaws.com"
5 changes: 5 additions & 0 deletions devops/dev/values.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
iam-cache-server-helm:
replicaCount: 3

# Pod disruption budget will be created only if replicaCount > 1
pdb:
enabled: true
minAvailable: 1

image:
repository: "ghcr.io/energywebfoundation/ssi-hub"
pullPolicy: IfNotPresent
Expand Down
1 change: 1 addition & 0 deletions devops/staging/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ iam-cache-server-helm:

image:
repository: "ghcr.io/energywebfoundation/ssi-hub"
tag: v2.13.0
pullPolicy: IfNotPresent

imagePullSecrets: [ ]
Expand Down
223 changes: 223 additions & 0 deletions docs/api/classes/modules_auth_login_strategy.AuthStrategy.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@

- [constructor](modules_auth_login_strategy.AuthStrategy.md#constructor)

### Methods

- [authenticate](modules_auth_login_strategy.AuthStrategy.md#authenticate)
- [decodeToken](modules_auth_login_strategy.AuthStrategy.md#decodetoken)
- [didUnification](modules_auth_login_strategy.AuthStrategy.md#didunification)
- [extractSiwe](modules_auth_login_strategy.AuthStrategy.md#extractsiwe)
- [extractToken](modules_auth_login_strategy.AuthStrategy.md#extracttoken)
- [getRoleDefinition](modules_auth_login_strategy.AuthStrategy.md#getroledefinition)
- [isEIP191TokenPayload](modules_auth_login_strategy.AuthStrategy.md#iseip191tokenpayload)
- [isSiweMessagePayload](modules_auth_login_strategy.AuthStrategy.md#issiwemessagepayload)
- [validate](modules_auth_login_strategy.AuthStrategy.md#validate)
- [verifyIssuer](modules_auth_login_strategy.AuthStrategy.md#verifyissuer)

## Constructors

### constructor
Expand All @@ -33,3 +46,213 @@
#### Overrides

PassportStrategy(LoginStrategy, 'login').constructor

## Methods

### authenticate

**authenticate**(`req`): `void`

#### Parameters

| Name | Type |
| :------ | :------ |
| `req` | `Request`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, `Record`<`string`, `any`\>\> |

#### Returns

`void`

#### Inherited from

PassportStrategy(LoginStrategy, 'login').authenticate

___

### decodeToken

**decodeToken**<`T`\>(`token`, `options?`): `T`

#### Type parameters

| Name |
| :------ |
| `T` |

#### Parameters

| Name | Type |
| :------ | :------ |
| `token` | `string` |
| `options?` | `DecodeOptions` |

#### Returns

`T`

#### Inherited from

PassportStrategy(LoginStrategy, 'login').decodeToken

___

### didUnification

**didUnification**(`did`): `string`

#### Parameters

| Name | Type |
| :------ | :------ |
| `did` | `string` |

#### Returns

`string`

#### Inherited from

PassportStrategy(LoginStrategy, 'login').didUnification

___

### extractSiwe

**extractSiwe**(`req`): `SiweReqPayload`

#### Parameters

| Name | Type |
| :------ | :------ |
| `req` | `Request`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, `Record`<`string`, `any`\>\> |

#### Returns

`SiweReqPayload`

#### Inherited from

PassportStrategy(LoginStrategy, 'login').extractSiwe

___

### extractToken

**extractToken**(`req`): `string`

#### Parameters

| Name | Type |
| :------ | :------ |
| `req` | `Request`<`ParamsDictionary`, `any`, `any`, `ParsedQs`, `Record`<`string`, `any`\>\> |

#### Returns

`string`

#### Inherited from

PassportStrategy(LoginStrategy, 'login').extractToken

___

### getRoleDefinition

**getRoleDefinition**(`namespace`): `Promise`<`IRoleDefinitionV2`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `namespace` | `string` |

#### Returns

`Promise`<`IRoleDefinitionV2`\>

#### Inherited from

PassportStrategy(LoginStrategy, 'login').getRoleDefinition

___

### isEIP191TokenPayload

**isEIP191TokenPayload**(`payload`): payload is ITokenPayload

#### Parameters

| Name | Type |
| :------ | :------ |
| `payload` | `unknown` |

#### Returns

payload is ITokenPayload

#### Inherited from

PassportStrategy(LoginStrategy, 'login').isEIP191TokenPayload

___

### isSiweMessagePayload

**isSiweMessagePayload**(`payload`): payload is Partial<SiweMessage\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `payload` | `unknown` |

#### Returns

payload is Partial<SiweMessage\>

#### Inherited from

PassportStrategy(LoginStrategy, 'login').isSiweMessagePayload

___

### validate

**validate**(`token`, `payload`, `done`): `Promise`<`void`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `token` | `string` |
| `payload` | `Partial`<`SiweMessage`\> \| `ITokenPayload` |
| `done` | (`err?`: `Error`, `user?`: `unknown`, `info?`: `unknown`) => `void` |

#### Returns

`Promise`<`void`\>

#### Inherited from

PassportStrategy(LoginStrategy, 'login').validate

___

### verifyIssuer

**verifyIssuer**(`issuer`, `role`): `Promise`<`VerificationResult`\>

#### Parameters

| Name | Type |
| :------ | :------ |
| `issuer` | `string` |
| `role` | `string` |

#### Returns

`Promise`<`VerificationResult`\>

#### Inherited from

PassportStrategy(LoginStrategy, 'login').verifyIssuer
2 changes: 1 addition & 1 deletion docs/api/classes/modules_did_did_processor.DIDProcessor.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
| `didService` | [`DIDService`](modules_did_did_service.DIDService.md) |
| `logger` | [`Logger`](modules_logger_logger_service.Logger.md) |
| `configService` | `ConfigService`<`Record`<`string`, `unknown`\>, ``false``\> |
| `pinQueue` | `Queue`<`any`\> |
| `pinQueue` | `Queue`<[`PinClaimData`](../modules/modules_ipfs_ipfs_types.md#pinclaimdata)\> |

## Methods

Expand Down
10 changes: 5 additions & 5 deletions docs/api/classes/modules_did_did_service.DIDService.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
- [obscureDid](modules_did_did_service.DIDService.md#obscuredid)
- [onModuleDestroy](modules_did_did_service.DIDService.md#onmoduledestroy)
- [onModuleInit](modules_did_did_service.DIDService.md#onmoduleinit)
- [resolveServiceEndpoints](modules_did_did_service.DIDService.md#resolveserviceendpoints)
- [resolveCredentials](modules_did_did_service.DIDService.md#resolvecredentials)

## Constructors

Expand Down Expand Up @@ -167,11 +167,11 @@ OnModuleInit.onModuleInit

___

### resolveServiceEndpoints
### resolveCredentials

**resolveServiceEndpoints**(`did`): `Promise`<`string`[]\>
**resolveCredentials**(`did`): `Promise`<`any`[]\>

Resolves document service endponts
Resolves service endponts, which represent credentials

#### Parameters

Expand All @@ -181,4 +181,4 @@ Resolves document service endponts

#### Returns

`Promise`<`string`[]\>
`Promise`<`any`[]\>
2 changes: 1 addition & 1 deletion docs/api/classes/modules_ipfs_ipfs_service.IPFSService.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
| :------ | :------ |
| `didStoreCluster` | `DidStore` |
| `didStoreInfura` | `DidStore` |
| `pinsQueue` | `Queue`<`string`\> |
| `pinsQueue` | `Queue`<[`PinClaimData`](../modules/modules_ipfs_ipfs_types.md#pinclaimdata)\> |
| `logger` | [`Logger`](modules_logger_logger_service.Logger.md) |

## Methods
Expand Down
Loading

0 comments on commit a9b5e17

Please sign in to comment.