Hi, I have added some requested features to the ic_siwe
library and provider canister.
Rust library: ic_siwe
Pre-built provider canister: ic_siwe_provider
Changes
The runtime behaviour of the ic_siwe_provider
canister and the ic_siwe
library can now be customized using the following settings:
IncludeUriInSeed
Default: URI is not included in the seed
When set, the URI is included in the seed used to generate the principal. Including the URI in the seed does not add any additional security in a scenario where ic_siwe_provider
is deployed and configured to serve only one domain. However, if the ic_siwe
library is used in a custom canister, that delagetes identities for more than one domain, it is recommended to enable this feature to ensure that the principal is unique for each domain.
runtime_features = opt vec { \
variant { IncludeUriInSeed } \
};
DisableEthToPrincipalMapping
Default: Mapping is enabled
When set, the mapping of Ethereum addresses to Principals is disabled. This also disables the canister endpoints get_principal
.
runtime_features = opt vec { \
variant { DisableEthToPrincipalMapping } \
};
DisablePrincipalToEthMapping
Default: Mapping is enabled
When set, the mapping of Principals to Ethereum addresses is disabled. This also disables the canister endpoints get_address
and get_caller_address
.
runtime_features = opt vec { \
variant { DisablePrincipalToEthMapping } \
};