-
Notifications
You must be signed in to change notification settings - Fork 33
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
[ANCHOR-342] Add clients
to the configuration
#946
[ANCHOR-342] Add clients
to the configuration
#946
Conversation
Reference Server Preview is available here: |
Something went wrong with PR preview build please check |
platform/src/main/resources/config/anchor-config-default-values.yaml
Outdated
Show resolved
Hide resolved
0cb9670
to
7af8a1c
Compare
Reference Server Preview is available here: |
Can we deprecate
Because with new schema we can always just use |
Reference Server Preview is available here: |
# Examples: | ||
# - domain: lobstr.com | ||
# type: non-custodial | ||
# public_key: GBI2IWJGR4UQPBIKPP6WG76X5PHSD2QTEBGIP6AZ3ZXWV46ZUSGNEGN2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does non-custodial wallet even have a public key? I think it should only be required for custodial wallets
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't lobstr.com server has a SIGNING_KEY
in the TOML file?
cc: @JakeUrban
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noncustodial wallets do have a public key, published on their stellar.toml file. This is nice because the non-custodial wallet could rotate their signing key and the anchor's authentication process would still work because it should fetch the SIGNING_KEY
on each authentication request.
For this same reason, I don't think we should require each wallet entry to have a public key attribute. Only custodial wallets will need the public_key
attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can add type
when there is an immediate use case. In that case, the public_key
will stay.
Is there a use case where a wallet uses |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made some comments / suggestions. Regarding backwards compatibility, I think we should deprecate the allowlist & denylist attributes but keep the client_attribution_required
flag. Then we'll validate that everything matches on startup if the wallets
object is present.
platform/src/main/resources/config/anchor-config-default-values.yaml
Outdated
Show resolved
Hide resolved
platform/src/main/resources/config/anchor-config-default-values.yaml
Outdated
Show resolved
Hide resolved
# Examples: | ||
# - domain: lobstr.com | ||
# type: non-custodial | ||
# public_key: GBI2IWJGR4UQPBIKPP6WG76X5PHSD2QTEBGIP6AZ3ZXWV46ZUSGNEGN2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Noncustodial wallets do have a public key, published on their stellar.toml file. This is nice because the non-custodial wallet could rotate their signing key and the anchor's authentication process would still work because it should fetch the SIGNING_KEY
on each authentication request.
For this same reason, I don't think we should require each wallet entry to have a public key attribute. Only custodial wallets will need the public_key
attribute.
# The flag to enable the status callback to the client domain | ||
client_domain_status_callback_enabled: true | ||
# The flag to enable the event delivery to the anchor business server | ||
callback_api_event_delivery_enabled: true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love the naming here. I think something generalized would be better:
events:
transaction_status_updated:
wallet_callbacks_enabled: true
callback_api_requests_enabled: true
This way, we can add more event types and more handlers of those events using a predefined structure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a event
section that defines the existing EventService
. This is specific to event-processor
.
I would probably swap the structure like. Please refer to the updated commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, I don't mind using the event-processor
top-level object.
What do you think about using event type as a sub-object though? That way the business could subscribe to a subset of events, instead of having just a single true
/false
attribute for all event types.
For example,
event_processor:
event_type:
transaction_status_updated:
client_callback_enabled: true
callback_api_requests_enabled: true
transaction_created:
client_callback_enabled: false
callback_api_requests_enabled: true
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't feel strongly about this. If we want to use a single attribute for all requests that it ok, we'll just have less flexibility and need to make assumptions about what anchors and clients will want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not all callbacks are interested in all event types. How about we do this:
event_processor:
# The context path of the event processing server
context_path: /
# The listening port of the event processing server
port: 8084
# The configuration of the status callback to the client domain
client_domain_status_callback:
enabled: true
# The configuration of the event delivery to the anchor business server
callback_api_event_delivery:
enabled: true
This will leave more room for customization and we don't have to define the behavior of the events unless it is necessary to customize.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey Jamie, can we use the following names, client_status_callback
and callback_api_requests
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use singular callback_api_request
because client_status_callback
is singular.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Works for me!
platform/src/main/resources/config/anchor-config-default-values.yaml
Outdated
Show resolved
Hide resolved
8be50e0
to
41af11e
Compare
Reference Server Preview is available here: |
2 similar comments
Reference Server Preview is available here: |
Reference Server Preview is available here: |
I am not sure if we may deprecate the
|
ca6f08f
to
ffd14b9
Compare
client_attribution
to the configurationclients
to the configuration
Reference Server Preview is available here: |
Can you provide an example of how it is inconsistent? I think the omnibus account list is directly associated with the |
ffd14b9
to
f76a8a5
Compare
Reference Server Preview is available here: |
Reference Server Preview is available here: |
PR Checklist
PR Structure
otherwise).
paymentservice.stellar
, orall
ordoc
if the changes are broad or impact manypackages.
Thoroughness
What
Add client_attribution to the configuration.
Why
This is to support the client status callback feature.