Skip to content

Adds support for managing token policies using the webapp#1206

Open
eyJhb wants to merge 5 commits into
desec-io:mainfrom
eyJhb:webapp-add-token-policies
Open

Adds support for managing token policies using the webapp#1206
eyJhb wants to merge 5 commits into
desec-io:mainfrom
eyJhb:webapp-add-token-policies

Conversation

@eyJhb
Copy link
Copy Markdown

@eyJhb eyJhb commented May 17, 2026

I made the basics for managing the token policies from the website, but without too much extra added features.
From the issue here #868 , it would be nice-to-have a dropdown/autocomplete of domains, but I think if it is initially just kept simple, then it could be added at a later point if someone finds that it's required.

As it is now, I tested it against desec.io and it worked just fine, no issues! I'm amazed how easy it was to add this management to the webapp.

Any suggestions/changes are appreciated :)

I tested it against desec.io by doing

diff --git a/www/webapp/vite.config.js b/www/webapp/vite.config.js
index 9ebfe90..5873c29 100644
--- a/www/webapp/vite.config.js
+++ b/www/webapp/vite.config.js
@@ -34,6 +34,12 @@ export default defineConfig({
     ],
     server: {
         port: 8080,
+        proxy: {
+            '/api': {
+                target: 'https://desec.io',
+                changeOrigin: true,
+            },
+        },
     },
     resolve: {
         alias: [{
image image image image

EDIT: I used LLMs to assist me with this PR :)

@nils-wisiol
Copy link
Copy Markdown
Contributor

This is great! Can you please rebase it onto #1173?

@eyJhb
Copy link
Copy Markdown
Author

eyJhb commented May 18, 2026

This is great! Can you please rebase it onto #1173?

Of course, I'll try to do that on a separate branch first :) Is there any ETA on when #1173 will be merged?

Also, I hope my approach in this PR is good and acceptable in regards to how to manage policies for tokens.
It's very much KISS, but it worked so wonderfully to just do through the web :)

@eyJhb
Copy link
Copy Markdown
Author

eyJhb commented May 18, 2026

I rebased mine ontop of that pr @nils-wisiol , but because that PR needs rebasing (there is also a conflict) as well, I'm getting extra commits when comparing the two branches :p

https://github.com/eyJhb/desec-stack/compare/20260109_vuetify3...eyJhb:desec-stack:webapp-add-token-policies-v3?expand=1

I could cherry pick them ontop, or something. I did a rebase of your branch on main, and then rebased that onto my branch, which resulted in this:

https://github.com/eyJhb/desec-stack/compare/20260109_vuetify3-rebased...eyJhb:desec-stack:webapp-add-token-policies-v3?expand=1

Everything seems to work.

@peterthomassen
Copy link
Copy Markdown
Member

peterthomassen commented May 18, 2026

Is there any ETA on when #1173 will be merged?

I'm planning to look at the code this month, but I don't know how much follow-up work that will cause. My gut feeling is that it'll be merged in the next few weeks.

Also, I hope my approach in this PR is good and acceptable in regards to how to manage policies for tokens.
It's very much KISS, but it worked so wonderfully to just do through the web :)

It definitely looks cool!

@eyJhb
Copy link
Copy Markdown
Author

eyJhb commented May 19, 2026

@peterthomassen Is it a hard requirement that we wait for #1173 is merged? When I did the rebase, it didn't really add any complexity on top of that PR anyways :)

EDIT: If so, then I'll try to target that branch instead, or something. I'm not sure what's best for displaying it here.

@nils-wisiol
Copy link
Copy Markdown
Contributor

It is not. The goal was to not introduce more code that is vuetify3 incompatible. If we can achieve that AND land this PR earlier, that's warmly welcome.

@eyJhb
Copy link
Copy Markdown
Author

eyJhb commented May 19, 2026

I've looked over this PR a bit, and compared it to the other, and I don't really see any in-compatibilities of this PR regarding vuetify3. When I rebased this against the other PR, it also worked fine with no changes required (no errors during npm run dev, creating, deleting, editing, etc. etc. worked just fine).

So as-is, I think it's compatible with vuetify3, so it should be OK to merge this :)

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.

3 participants