Open cmaliwal opened 5 years ago
AccountInfo
is not currently extendable but perhaps it could be in the future. Reason being is that it's usually not a good idea to put personal information about account holders on the ledger. There are a number of options you have:
externalId
)AccountInfo
as a reference state in the transactions which create the data states.How Accounts
authenticate a request i.e. how to ensure that the user that is invoking the Flow is a correct person?
In the current implementation, this library just requires UUID of account to perform the transaction. So, if any other account has my accountId
then he can perform operations on my behalf?. Also, I noticed that AccountInfo
(name, host, accountId) is/should be public at the network level (to know all available accounts across nodes).
So, How this implementation ensures that the invoker of the Flow is an authenticated account?
@roger3cev this is what we're after as well in a project currently, but the CreateAccount
flow doesn't allow setting an (optional) externalId
. Also the field is not available for queries in PersistentAccountInfo
. Does it make sense for me to make a (backwards compatible) PR for this?
@manosbatsis I use the name
property of the AccountInfo
state each time I need an external identifier for the account (actually I couldn't find any other utility for this property :D ) - maybe it fits your use case also ...
@mevir that won't work for me - need the name
for a human-readable handle, which is why i'm after a more accessible externalId
as a business key.
@manosbatsis well, the name
must be unique at the node level. If you want to use something like firstName lastName
as a human-readable handle the probability of collisions is high.
Also take care of personal data - if the owner of the account is a EU citizen he has the right to be forgotten under GDPR - I don't know how this can be handled as long as the AccountInfo
state can be shared freely with other nodes - is there is a tracking for this?
@mevir our use-cases are more about agents like services or legal entities VS persons, where having both an external business key as externalId
along with a (unique) human readable name
is very convenient. PR https://github.com/corda/accounts/pull/105 allows the typical LinearState.linearId.externalId
approach with AccountInfo
.
Indeed user accounts need more careful consideration; i believe even usernames are borderline GDPR-wise.
I have a use case where each account would have some extra details like First Name, Last Name, Email etc. I noticed that your library creates
AccountInfo
State which is accessible by all accounts on the same node. So, can we extendAccountInfo
such it can store custom fields along with name, host and identifier? Also, is it wise to create another State to store user information and share it with all the other accounts on the same node?