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

Adding FreeIPA WebUI plugins to the freeipa-container installation. #621

Closed
benhunterco opened this issue Sep 6, 2024 · 3 comments
Closed

Comments

@benhunterco
Copy link

I am trying to use WebUI plugins to display a banner on login to the webui to users as described in the FreeIPA documentation and the 4th comment here.

I have tried adding the plugins as described in the wiki by shelling into the running docker container and copying the plugins from the data directory into the requisite directories in the container, but these directories are read only inside the container. Additionally. I tried adding the plugins to the <nexus-data>/usr/share/ipa/ui/js/plugins/ directory that is mounted as the nexus data directory as a docker volume. But I didn't see any changes to the UI after running a docker restart.

Are the WebUI plugins supported in freeipa-containers, and if so what is their method of installation?

@adelton
Copy link
Collaborator

adelton commented Sep 6, 2024

Wouldn't you want to mount that plugins directory to /usr/share/ipa/ui/js/plugins/ in the container, rather than to the /data/ directory?

I don't think we have any specific support / documentation for plugins. Either adding it to the container image with and additional COPY step, or mounting it in in runtime, are likely the best options.

@abbra
Copy link

abbra commented Sep 8, 2024

I would say the best way is to create and maintain your own image that includes your plugins in it. With github actions and similar CIs in other systems maintaining a new image is relatively easy and trouble-free.

However, be aware that the new Web UI we are working on (https://github.com/freeipa/freeipa-webui/) will not have plugin support in its initial releases. And when that support would be added, it will be different from the way how UI plugins added in the current web UI. We don't know yet how that is going to work, just a fair warning.

@benhunterco
Copy link
Author

Wouldn't you want to mount that plugins directory to /usr/share/ipa/ui/js/plugins/ in the container, rather than to the /data/ directory?

I don't think we have any specific support / documentation for plugins. Either adding it to the container image with and additional COPY step, or mounting it in in runtime, are likely the best options.

You were right that that would work, thank you! I had initially thought maybe there would be some sort of container logic to pull in plugins found in the one data volume mount. I was able to get the plugins working by adding the mounts:

  • -v <host>/plugins:/usr/share/ipa/ui/js/plugins
  • -v <host>/freeipa/plugins.js:/usr/share/ipa/ui/js/freeipa/plugins.js

I also had to make sure file permissions were right but after that the plugins loaded as expected.

That is good to know abbra. I'll keep an eye on that release. We need the plugins to show a login banner text. Without that baked in as a feature in the new UI or via plugins, I think we would need to create a custom image like you have suggested.

Thanks again!

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

3 participants