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

API question: HttpService registerServlet and registerResources enumeration #56

Open
lykkja opened this issue Oct 13, 2020 · 1 comment

Comments

@lykkja
Copy link

lykkja commented Oct 13, 2020

Dear all,
Is there a way to query the HttpService or registered servlets and/or resources. This can be useful in managing the HttpServlet and security assessment of the OSGi environment. Numerous bundles can register servlets, and it is difficult for an administrator of the OSGi environment to assess if a bundle is exposing servlets or not. Such an API enables extra inspection of of servelts exposing Web services.

@chlarsson
Copy link
Contributor

Hi, apologies for the late reply. There's no such API. There is however a console command that does more or less what you are asking for. It's the http command group, and list -r will provide the following:

http> list -r
Configured HTTP Servers
# 0: org.knopflerfish.bundle.http.factory.HttpServer.default #
  http: 8080  Open
  https: 443  Closed (pending no SSL Server Socket Factory registered)
  Registrations
    '/docs'
      Resource registered by bundle: #38 - org.knopflerfish.bundle.httproot-IMPL
    '/servlet/knopflerfish-info'
      Servlet registered by bundle: #38 - org.knopflerfish.bundle.httproot-IMPL
    '/'
      Resource registered by bundle: #38 - org.knopflerfish.bundle.httproot-IMPL
http> 

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