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

Trust local, dev CA in containers #28

Closed
wants to merge 2 commits into from
Closed

Trust local, dev CA in containers #28

wants to merge 2 commits into from

Conversation

joecorall
Copy link
Contributor

@joecorall joecorall commented Dec 7, 2023

For the dev profile, a locally trusted CA is created and used to serve TLS traffic on https://islandora.dev.

This locally signed CA is not trusted by containers, only by the host operating system.

isle-buildkit already updates the proper CA trust store in the base s6 overlay. We can use this to trust the local CA inside other containers.

Testing

Create a site using the isle-site-template and start the dev profile

docker compose --profile dev up -d

Add media to your site, and see that no derivates are created.

Use this PR's YML and bring down your containers and backup and see the derivates are created

docker compose stop
docker compose --profile dev stop
docker compose --profile dev up -d

joecorall and others added 2 commits December 7, 2023 13:08
To take advantage of the local CA store in the dev profile
@joecorall
Copy link
Contributor Author

The Crayfits microservice still does not create derivatives even with this PR. That will be resolved with Islandora/Crayfish#180

However, this PR still fixes other derivative creation, e.g. hypercube, houdini, etc.

@seth-shaw-asu
Copy link
Contributor

I'm not able to reproduce. My image derivatives work without the PR:
Screenshot 2023-12-13 142830

@seth-shaw-asu seth-shaw-asu self-requested a review January 3, 2024 19:05
@seth-shaw-asu
Copy link
Contributor

Tried again today. FITS indeed wasn't working. I applied the patch but that didn't fix the issue. The Crayfits container reports:

2024-01-03 11:22:47 [2024-01-03 19:22:47] php.INFO: User Deprecated: The "Symfony\Component\Debug\DebugClassLoader" class is deprecated since Symfony 4.4, use "Symfony\Component\ErrorHandler\DebugClassLoader" instead. {"exception":"[object] (ErrorException(code: 0): User Deprecated: The \"Symfony\\Component\\Debug\\DebugClassLoader\" class is deprecated since Symfony 4.4, use \"Symfony\\Component\\ErrorHandler\\DebugClassLoader\" instead. at /var/www/crayfish/CrayFits/vendor/symfony/debug/DebugClassLoader.php:16)"} []
2024-01-03 11:22:47 [2024-01-03 19:22:47] request.INFO: Matched route "app_fits_exec". {"route":"app_fits_exec","route_parameters":{"_route":"app_fits_exec","_controller":"App\\Controller\\FitsController::generate_fits"},"request_uri":"http://crayfits:8000/","method":"GET"} []
2024-01-03 11:22:47 [2024-01-03 19:22:47] request.CRITICAL: Uncaught PHP Exception ErrorException: "Warning: Undefined variable $response" at /var/www/crayfish/CrayFits/src/Controller/FitsController.php line 62 {"exception":"[object] (ErrorException(code: 0): Warning: Undefined variable $response at /var/www/crayfish/CrayFits/src/Controller/FitsController.php:62)"} []
2024-01-03 11:22:47 172.18.0.16 - - [03/Jan/2024:19:22:47 +0000] "GET / HTTP/1.1" 500 78393 "-" "Apache-HttpClient/4.5.13 (Java/17.0.9)" "-"

@joshdentremont
Copy link
Contributor

I'm also not seeing any difference with these changes. When I try to create derivatives it's working for everything but fits, with or without this change. @joecorall What buildkit version are you running that isn't creating other derivatives? I'm running 2.0.10.

@joecorall
Copy link
Contributor Author

Thanks, guys. Sorry for the false-positive. I must have had some wires crossed somewhere. The crayfits issued should be cleared up with Islandora/Crayfish#180

@joecorall joecorall closed this Jan 4, 2024
@joecorall joecorall deleted the trust-local-ca branch January 4, 2024 14:34
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