Skip to content

Conversation

dkocher
Copy link
Contributor

@dkocher dkocher commented Jun 13, 2025

@dkocher dkocher added this to the 1.0.0 milestone Jun 13, 2025
@dkocher dkocher requested a review from chenkins June 13, 2025 13:51
@dkocher dkocher self-assigned this Jun 13, 2025
@dkocher dkocher force-pushed the issues/87-macos branch 2 times, most recently from c905afa to 0f41060 Compare June 14, 2025 08:20
@dkocher
Copy link
Contributor Author

dkocher commented Jun 16, 2025

First Login

Screenshot 2025-06-16 at 22 16 19

Authorization Required

Screenshot 2025-06-16 at 22 16 02

@dkocher dkocher force-pushed the issues/87-macos branch 2 times, most recently from 22be0cf to 75af26c Compare June 17, 2025 11:02
@chenkins chenkins marked this pull request as draft June 17, 2025 11:20
@chenkins chenkins changed the title [WiP] User interface implementation User interface implementation Jun 17, 2025
@dkocher dkocher force-pushed the issues/87-macos branch from f30af43 to 38e9aca Compare July 5, 2025 06:22
@dkocher dkocher marked this pull request as ready for review July 5, 2025 06:23
@dkocher dkocher force-pushed the issues/87-macos branch from 38e9aca to 5f6712b Compare July 9, 2025 12:23
@dkocher dkocher force-pushed the issues/87-macos branch 2 times, most recently from f10ac31 to d3d34d4 Compare September 4, 2025 19:21
@dkocher dkocher force-pushed the issues/87-macos branch 2 times, most recently from 88dbfaa to 94a4d11 Compare October 14, 2025 13:38
@dkocher dkocher linked an issue Oct 15, 2025 that may be closed by this pull request
1 task
@dkocher dkocher force-pushed the issues/87-macos branch 3 times, most recently from 6031d93 to d28bcfd Compare October 15, 2025 15:31
@dkocher dkocher marked this pull request as draft October 15, 2025 15:31
@dkocher dkocher force-pushed the issues/87-macos branch 4 times, most recently from 809159a to 8650abd Compare October 16, 2025 11:45
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());
Copy link
Contributor

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);
Copy link
Contributor

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,
Copy link
Contributor

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(),
Copy link
Contributor

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(),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this browser?

Comment on lines +126 to +127
.enabled(true)
.maxWotDepth(null));
Copy link
Contributor

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.

Comment on lines +139 to +140
storage.getHost().getProtocol().isRoleConfigurable() && !S3Session.isAwsHostname(storage.getHost().getHostname()),
storage.getHost().getProtocol().isRoleConfigurable() && S3Session.isAwsHostname(storage.getHost().getHostname()));
Copy link
Contributor

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) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

???

Copy link
Contributor Author

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");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Extract key to constant?

Comment on lines +116 to +117
case ROLE_KEY_CONFIGURABLE_KEY:
return dto.getStsRoleArn() != null;
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implementation of device setup callback with user interface

2 participants