Skip to content

Commit 1630fe1

Browse files
authored
Merge pull request #2252 from oasisprotocol/kostko/feature/siwe-any-domain
rofl-scheduler: Allow any domain in SIWE, change statement
2 parents cf37717 + d31932f commit 1630fe1

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

rofl-scheduler/rofl.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: rofl-scheduler
2-
version: 0.2.1
2+
version: 0.2.2
33
repository: https://github.com/oasisprotocol/oasis-sdk
44
tee: tdx
55
kind: raw
@@ -43,7 +43,11 @@ deployments:
4343
- id: d8+W9SL9GLSjlox5EahAzQdb/ruz4Qb2al4l9+gsDfUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
4444
version: 0.2.0
4545
- id: aiLfTIGfj4Qb2utbgmxfWownULME4wRXz3lbvL7vWnYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
46+
version: 0.2.1
4647
- id: 33R8MVGCGJg3CAYKDR87Zv2kvj65lbpcAHmZLKRA5FYAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
48+
version: 0.2.1
49+
- id: Sa0PyyZJsj4UpjE6IJOyqsi92iNMrwULpRbF2tq8YmQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
50+
- id: zt08xPOoXhy1SWHNcBNalVDjf6EHAUu9x6Tvq7aOBrwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
4751
endorsements:
4852
- any: {}
4953
fees: endorsing_node
@@ -80,7 +84,11 @@ deployments:
8084
- id: JronXGA4H36ZRJsNQn0qRpWlinNIb7wvk/MhZqKF1S4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
8185
version: 0.2.0
8286
- id: oo8dzG9hhkjKpY5G2/KozFXtpWncDNTMAYCSAMvWNFMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
87+
version: 0.2.1
8388
- id: erQlwbWIEIx3WdLCqb7C/wWsDjDQgTW5VssQb9APrKMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
89+
version: 0.2.1
90+
- id: Iq6cDWfVpHrAfgbFvaEqhnZ7YCDHfoXEWlU5n2xFnJAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
91+
- id: e9QSiflGUzqJei84tKL8N81HOMKkOXLfU6X/M/p00N0AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA==
8492
endorsements:
8593
- any: {}
8694
fees: endorsing_node

rofl-scheduler/src/serverd/auth.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,17 @@ impl AuthLoginRequest {
102102
return Err(anyhow!("message is not yet valid or has expired"));
103103
}
104104

105-
let expected_statement = format!("Provider: {}", provider.to_bech32());
105+
let expected_statement = format!(
106+
"Authenticate to ROFL provider {} to manage your machines via API at {}.",
107+
provider.to_bech32(),
108+
domain,
109+
);
106110
if message.statement != Some(expected_statement) {
107111
return Err(anyhow!("message does not have the expected statement"));
108112
}
109113

110114
let verification_opts = siwe::VerificationOpts {
111-
domain: Some(domain.parse()?),
115+
// We currently allow any origin domain.
112116
..Default::default()
113117
};
114118
message.verify(&signature, &verification_opts).await?;

0 commit comments

Comments
 (0)