-
Notifications
You must be signed in to change notification settings - Fork 0
User interface implementation #127
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
base: main
Are you sure you want to change the base?
Conversation
c905afa
to
0f41060
Compare
22be0cf
to
75af26c
Compare
a18c380
to
3d24571
Compare
f10ac31
to
d3d34d4
Compare
88dbfaa
to
94a4d11
Compare
6031d93
to
d28bcfd
Compare
809159a
to
8650abd
Compare
fdee575
to
8bed1ae
Compare
return this.recover(me, deviceKeyPair, prompt.askForAccountKeyAndDeviceName(hub, COMPUTER_NAME)); | ||
final AccountKeyAndDeviceName input = prompt.askForAccountKeyAndDeviceName(hub, COMPUTER_NAME); | ||
if(input.addToKeychain()) { | ||
this.save(hub, me, input.accountKey()); |
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.
Account Key must not be saved to keychain as per https://github.com/shift7-ch/katta-arc42/pull/1/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R333-R336. The account key can be changed in the web UI and therefore this can lead to inconsistencies.
|
||
return this.uploadDeviceKeys(deviceName, | ||
if(input.addToKeychain()) { | ||
this.save(hub, me, accountKey); |
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.
Idem.
// upload template (STS: create bucket first, static: existing bucket) | ||
// TODO test with multiple wot levels? | ||
final UUID vaultId = UUID.fromString(new UUIDRandomStringService().random()); | ||
final Path bucket = new Path(null == config.vault.bucketName ? null == storageProfileWrapper.getBucketPrefix() ? "katta-test-" + vaultId : storageProfileWrapper.getBucketPrefix() + vaultId : config.vault.bucketName, |
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.
Double ? is not readable imho.
new StringAppender() | ||
.append(LocaleFactory.localizedString("On first login, every user gets a unique Account Key", "Hub")) | ||
.append(LocaleFactory.localizedString("Your Account Key is required to login from other apps or browsers", "Hub")) | ||
.append(LocaleFactory.localizedString("You can see a list of authorized apps on your profile page", "Hub")).toString(), |
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.
Is it clear for Desktop users where to find profile page?
LocaleFactory.localizedString("Authorization Required", "Hub"), | ||
new StringAppender() | ||
.append(LocaleFactory.localizedString("This is your first login on this device.", "Hub")) | ||
.append(LocaleFactory.localizedString("Your Account Key is required to link this browser to your account.", "Hub")).toString(), |
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.
this browser?
.enabled(true) | ||
.maxWotDepth(null)); |
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.
Take from configurable defaults for enabled and maxWotDepth.
storage.getHost().getProtocol().isRoleConfigurable() && !S3Session.isAwsHostname(storage.getHost().getHostname()), | ||
storage.getHost().getProtocol().isRoleConfigurable() && S3Session.isAwsHostname(storage.getHost().getHostname())); |
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.
Give name, extract to variable each.
configuration.setProperty(S3AssumeRoleProtocol.S3_ASSUMEROLE_ROLEARN_TAG, null); | ||
storage.open(ProxyFactory.get(), new DisabledHostKeyCallback(), login, new DisabledCancelCallback()); | ||
final Path vault; | ||
if(false) { |
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 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.
Implementation is expected to be in super class with generic implementation for UVF. @ylangisc
properties.add(String.format("%s=%s", S3AssumeRoleProtocol.S3_ASSUMEROLE_DURATIONSECONDS, dto.getStsDurationSeconds().toString())); | ||
} | ||
} | ||
properties.add("s3.assumerole.rolearn.tag.vaultid.key=Vault"); |
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.
Extract key to constant?
case ROLE_KEY_CONFIGURABLE_KEY: | ||
return dto.getStsRoleArn() != null; |
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.
Add comment on re-using `ROLE_KEY_CONFIGURABLE_KEY? for STS/static distinction, hard to remember.
Resolve #87.
Depends on