Skip to content
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

Add an optional environment variable for docker images in order to easily and globally configure additional startup flags #2648

Open
abdallahghdiri opened this issue Feb 1, 2025 · 0 comments

Comments

@abdallahghdiri
Copy link

abdallahghdiri commented Feb 1, 2025

Why is this needed

Web apps using the Web Crypto API will only work in Secure contexts (HTTPS) (or for web apps served over localhost or .localhost domain)

The latest Keycloak release (26) began using this API in its Javascript adapter for example

Image

How to bypass this limitation

In order to bypass this limitation and facilitate local testing using karate UI, we can add the following flag --unsafely-treat-insecure-origin-as-secure to chromium based browsers in karate docker images

Proposal

Add an optional environment variable in karate docker images that when set add its value as additional flags to browsers' startup command.

  karate-additional-browser-flags:
    image: karatelabs/karate-chrome:latest
    environment:
      KARATE_BROWSER_ADDITIONAL_FLAGS: "--unsafely-treat-insecure-origin-as-secure=http://keycloak:8080"

Using a generic environment variable should offer flexibility to adapt the images in future use cases

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

No branches or pull requests

1 participant