Skip to content

Conversation

@luanlorenzo
Copy link
Contributor

@luanlorenzo luanlorenzo commented Dec 15, 2025

📝 Description

This pull request introduces UI selector for secrets manager providers to simplify role credentials configuration.

🚀 Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Style/UI update
  • ♻️ Code refactor
  • ⚡ Performance improvement
  • ✅ Test update
  • 🔧 Build configuration change
  • 🧹 Chore

📋 Changes Made

Connection Method and Credential Source Handling:

  • Added webapp/connections/views/setup/connection_method.cljs with logic to normalize credential values, infer connection method from sources, and provide UI components for selecting connection method and source. This includes support for manual input, secrets manager, and AWS IAM role, as well as source selectors for environment variable inputs.
  • Refactored event handling in events/db_events.cljs to store network credentials as maps with both value and source, and to infer/update the credential source based on the selected connection method or secrets manager provider.

Environment Variables Input Improvements:

  • Updated configuration_inputs.cljs to conditionally render input fields with a left adornment (source selector) when secrets manager is selected, allowing users to choose the source for each environment variable. Also added logic to hide default titles/subtitles when needed. [1] [2]

Form Components Enhancement:

  • Added input-with-adornment to forms.cljs, a new input component supporting start adornments (such as a dropdown for source selection), and refactored password visibility toggling logic for better reuse.

Documentation Link Updates:

  • Updated documentation URLs in config.cljs to include a new reference for RDS IAM authentication setup.

Module Imports and Integration:

  • Integrated the new connection-method module across relevant files for environment variable and event handling. [1] [2]

🧪 Testing

Test Configuration:

  • Browser(s): Chrome
  • OS: MacOs

Tests performed:

  • Unit tests pass
  • Integration tests pass
  • Manual testing completed

📸 Screenshots (if applicable)

image image image

✅ Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • New and existing unit tests pass locally with my changes
  • I have checked my code and corrected any misspellings

@luanlorenzo luanlorenzo self-assigned this Dec 15, 2025
@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-c0298ba

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-8774e04

Copy link
Contributor

@matheusfrancisco matheusfrancisco left a comment

Choose a reason for hiding this comment

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

I noticed that our shadow-cljs config doesn't explicitly set the ClojureScript version, which means it defaults to whatever version shadow-cljs uses. I'd recommend we explicitly specify it because certain features depend on the version.
For example, update-vals is only available in ClojureScript ≥ 1.11.60. Since ClojureScript is backward compatible, upgrading shouldn't break anything in our frontend webapp.
We should add this to our :dependencies in shadow-cljs.edn:
clojure:dependencies
[[org.clojure/clojurescript "1.11.60"]
...]
Reference: https://github.com/hoophq/hoop/blob/main/webapp/shadow-cljs.edn#L5
Without explicitly setting the version, we're at the mercy of shadow-cljs's default, which might not include update-vals or other newer features we need.

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-04316dc

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-ba556ec

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-ba34955

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-f7d196f

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-fdd4bc8

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-e957bf3

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-6980338

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-a3aaa91

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-994294a

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-1dd7413

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-7028fcf

@luanlorenzo luanlorenzo requested a review from rogefm December 19, 2025 21:11
@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-e6de37c

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-e687b93

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-c00ef8e

@luanlorenzo luanlorenzo force-pushed the luan/eng-38-new-ux-for-secrets-manager-integration branch from 74e1f92 to e687b93 Compare December 22, 2025 14:54
@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-74e1f92

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-e687b93

Comment on lines +187 to +210
updated-db (cond
;; Update metadata-credentials if field exists there
(contains? metadata-credentials field-key)
(assoc-in db [:connection-setup :metadata-credentials field-key]
{:value (if (map? metadata-value)
(:value metadata-value)
(or metadata-value ""))
:source source})

;; Update SSH credentials if field exists there
(contains? ssh-credentials field-key-str)
(assoc-in db [:connection-setup :ssh-credentials field-key-str]
{:value (if (map? ssh-value)
(:value ssh-value)
(or ssh-value ""))
:source source})

;; Update Kubernetes token if field exists there
(contains? kubernetes-token field-key-kw)
(assoc-in db [:connection-setup :kubernetes-token field-key-kw]
{:value (if (map? kubernetes-value)
(:value kubernetes-value)
(or kubernetes-value ""))
:source source})
Copy link
Contributor

Choose a reason for hiding this comment

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

Here is a cond that does the same thing in all conditions

@rogefm
Copy link
Contributor

rogefm commented Dec 23, 2025

Screen Recording 2025-12-23 at 16 19 33

The input is not accepting more than one character when you try to insert at the beginning.

@rogefm
Copy link
Contributor

rogefm commented Dec 23, 2025

Screenshot 2025-12-23 at 16 16 55

Some resource types don't have env variables.

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-76d5d2f

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-e348777

@sandromello
Copy link
Contributor

✅ Build Completed with Success, Version=1193.0.0-390c405

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.

5 participants