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

Container Deployment #490

Open
cstockloew opened this issue May 3, 2018 · 2 comments
Open

Container Deployment #490

cstockloew opened this issue May 3, 2018 · 2 comments

Comments

@cstockloew
Copy link
Member

There are a few methods in the container interfaces that are related to deployment of new bundles/artefacts, i.e.:

  • ModuleContext.canBeXXX (canBeStarted, canBeStopped, canBeUninstalled)
  • ModuleContext.start/stop/uninstall
  • Container.installModule

It is said in javadoc for installModule: "only an certain modules should be allowed to install modules on the fly". But this never checked and it is unclear how this can be checked. Additionally, these methods are polluting the interfaces as they should only be called by certain modules.

We now have 2 possibilities:

  1. Remove all these methods. The current implementation for the DeployManager uses its own way through a separate bundle mw.connectors.deploy.karaf.osgi, so these methods are actually not needed.
  2. Refactor these methods into a new OSGi service (interface Deployment and class OSGiDeployment) and let the security of OSGi handle it: the modules that are allowed to install modules on the fly need the proper permissions in their permissions.perm (same security principle that is done for bus access).
@cstockloew
Copy link
Member Author

Oh, I just see that BundleContext.installBundle (that is called by Container.installModule) throws a SecurityException if the caller does not have the appropriate AdminPermission, so it is already checked by OSGi security..
So, do we keep it (considering that the DeployManager uses its own methods)?

@amedranogil
Copy link
Member

I think deployment is something that was not completed. It should be further developed, thus I think, even though we can/should not invest effort on it right now, the concept or the potential to implement it in the future must remain.

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

2 participants