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: app usable without local secure environment support #209

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

berendsliedrecht
Copy link
Member

@berendsliedrecht berendsliedrecht commented Nov 12, 2024

draft as we need a hosted version of the wallet service provider to make sure we can use it easier.

Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
@berendsliedrecht berendsliedrecht marked this pull request as draft November 12, 2024 15:17
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
@berendsliedrecht berendsliedrecht marked this pull request as ready for review November 15, 2024 14:23
Signed-off-by: Berend Sliedrecht <sliedrecht@berend.io>
Copy link
Member

@TimoGlastra TimoGlastra left a comment

Choose a reason for hiding this comment

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

Nice! Great first step, left some comments

@@ -0,0 +1,2 @@
EXPO_PUBLIC_WALLET_SERVICE_PROVIDER_AUTH_TOKEN=0dd5e0ac-f6a5-42ce-b945-09735c3a8f17
Copy link
Member

Choose a reason for hiding this comment

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

Auth token doesn't really work for mobile apps as you can extract it from the build.

Or is this temporary until we can do app integrity?

@@ -0,0 +1,52 @@
import type { SecureEnvironment } from '@animo-id/expo-secure-environment'

export class WalletServiceProviderClient implements SecureEnvironment {
Copy link
Member

Choose a reason for hiding this comment

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

Can we move this to a separate package?

await response.text()
}

public async getPublicBytesForKeyId(keyId: string): Promise<Uint8Array> {
Copy link
Member

Choose a reason for hiding this comment

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

We will probably have to sign each request with a key or something for auth?

Copy link
Member

Choose a reason for hiding this comment

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

Probably we should do: app integrity, issue access token bound to app integrity.

Also c' flow has some guidance on how to interact with hsm i think, did you look into that already?

@@ -0,0 +1,52 @@
import type { SecureEnvironment } from '@animo-id/expo-secure-environment'

export class WalletServiceProviderClient implements SecureEnvironment {
Copy link
Member

Choose a reason for hiding this comment

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

Also, i'm not really sure why this implements secure env? We're going yo have to interact a lot more with the wallet provider backend (for attestations etc). I think it makes more sense to create a separate service.

Also my understanding was we'd also create other keys in the HSM, but it now looks we only do the PID key?

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.

2 participants