Monitoring OSGi Applications with the Web Console - Carsten Ziegeler
- 2. About
cziegeler@apache.org
@cziegeler
§
Rnd Team at Adobe Research Switzerland
§
OSGi Core Platform and Enterprise Expert Groups
§
Member of the ASF
§
Most active in Apache Sling, Felix, Ace
§
Conference Speaker
§
Technical Reviewer
§
Article/Book Author
2
- 5. Apache Felix Web Console
§
Rich set of core functionality
§
Bundles
§
Services
§
Configuration Admin
§
System Information
§
JQuery based UI
§
Extensible
§
Pluggable authentication
§
Still light-weight
5
- 10. Sample Plugin #2
public class Sample2 extends SimpleWebConsolePlugin {
public Sample2(BundleContext ctx) {
super("sample2", "Sample Plugin #2", null);
register(ctx);
}
@Override
protected void renderContent(
HttpServletRequest req,
HttpServletResponse res)
throws IOException {
res.getWriter().println("Hi There ...")
}
}
10
- 11. Apache Felix Inventory
§
OSGi service providing status information
§
Bundle list, services, system properties etc.
§
Different formats: text, html, json
§
Optional attachments
§
Directly support in
web console
11
- 13. Branding
§
Service Interface: BrandingPlugin
§
Default Branding: DefaultBrandingPlugin
§
Branding Fragment
§
§
/META-INF/webconsole.properties
webconsole.brand.name = Apache Sling Web Console
webconsole.product.name = Apache Sling
webconsole.product.url = http://sling.apache.org
webconsole.product.image = /res/sling/logo.png
webconsole.favicon = /res/sling/favicon.ico
Sample
§
Sling Web Console Branding Plugin
13
- 14. Security Provider
§
Service interface: WebConsoleSecurityProvider
§
§
Validates Username / Password
§
§
HTTP Basic Authentication Based
Access Control (hook only)
Service Interface: WebConsoleSecurityProvider2
§
§
§
Extends WebConsoleSecurityProvider
Flexible Authentication (implementing HttpContext.handleSecurity)
Implementations
§
Default: Single configurable User
§
Karaf: JAAS based authentication
§
Sling
§
Authenticates against JCR Repository
§
Supports Sling Authentication Setup
14