Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement azure keyvault rest client #56

Merged
merged 47 commits into from
Dec 4, 2024
Merged

Conversation

jcmelati
Copy link
Contributor

No description provided.

Copy link
Contributor

@nklomp nklomp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please change kms name handling with the empty strings. That will lead to errors. Rather ignore it with @ts-ignore. Then a regular Veramo KMS will throw an error and our KMS handles it nicely.

@@ -23,7 +23,7 @@ export class JwkDIDProvider extends AbstractIdentifierProvider {
async createIdentifier(args: ICreateIdentifierArgs, context: IRequiredContext): Promise<Omit<IIdentifier, 'provider'>> {
const key = await importProvidedOrGeneratedKey(
{
kms: args.kms ?? this.defaultKms,
kms: args.kms ?? this.defaultKms ?? '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather have a ts-ignore here. Our KMS handles it correctly when no KMS is provided. Using an empty string will result in errors

@@ -67,7 +67,7 @@ export class SphereonKeyDidProvider extends AbstractIdentifierProvider {

const key = await importProvidedOrGeneratedKey(
{
kms: kms ?? this.kms,
kms: kms ?? this.kms ?? '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather have a ts-ignore here. Our KMS handles it correctly when no KMS is provided. Using an empty string will result in errors

@@ -48,7 +48,7 @@ export class OydDIDProvider extends AbstractIdentifierProvider {
const keyType: OydDidSupportedKeyTypes = options?.keyType || 'Ed25519'
const key = await this.holdKeys(
{
kms: kms || this.defaultKms,
kms: kms || this.defaultKms || '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather have a ts-ignore here. Our KMS handles it correctly when no KMS is provided. Using an empty string will result in errors

@@ -102,7 +102,7 @@ export class OydDIDProvider extends AbstractIdentifierProvider {
private async holdKeys(args: OydDidHoldKeysArgs, context: IContext): Promise<IKey> {
if (args.options.privateKeyHex) {
return context.agent.keyManagerImport({
kms: args.kms || this.defaultKms,
kms: args.kms || this.defaultKms || '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather have a ts-ignore here. Our KMS handles it correctly when no KMS is provided. Using an empty string will result in errors

@@ -113,7 +113,7 @@ export class OydDIDProvider extends AbstractIdentifierProvider {
}
return context.agent.keyManagerCreate({
type: args.options.keyType,
kms: args.kms || this.defaultKms,
kms: args.kms || this.defaultKms || '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Rather have a ts-ignore here. Our KMS handles it correctly when no KMS is provided. Using an empty string will result in errors

Copy link
Contributor

@nklomp nklomp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Will merge for new release

@nklomp nklomp marked this pull request as ready for review December 4, 2024 16:03
@nklomp nklomp merged commit 650ee51 into develop Dec 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants