interledger / rafiki

An open-source, comprehensive Interledger service for wallet providers, enabling them to provide Interledger functionality to their users.
https://rafiki.dev/
Apache License 2.0
226 stars 77 forks source link

[FEATURE REQUEST] Admin API query for fetching walletAddressKeys #2631

Closed golobitch closed 2 months ago

golobitch commented 2 months ago

Feature Request

Describe the feature you'd like to request

I would like to have query that would return walletAddressKeys. Use case is actually quite simple:

If ASE wants to implement Key management, one of the important thing is also to show keys. This is currently possible by performing following call:

GET {walletAddress}/jwks.json

This one is fine, but apparently jwks.json does not include id, which is needed if ASE wants to revoke key.

Describe the solution you'd like Probably the best solution is to have FieldResolver inside of the WalletAddress object. Following query would be perfect IMHO

query WalletAddressData(id: String!) {
    walletAddress(id: $id) {
        id
        url
        keys: {
            id
            name
            createdAt
            publicKey
        }
    }
}

Something like this :)

Describe alternatives you've considered Alternative solution for ASE is to save keys in own database / table / whatever. Or maybe save mapping between walletAddressKey and own key data for the purpose of having all the data in some persistent storage.

Additional context N/A

sabineschaller commented 2 months ago

This one is fine, but apparently jwks.json does not include id, which is needed if ASE wants to revoke key.

It has kid which is the id property in JWKs.

But I think this is still a valid feature request.