Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 7. Securing the Management Console


Abstract

The default setting for Access-Control-Allow-Origin header for the JBoss Fuse Management Console permits unrestricted sharing. To restrict access to the JBoss Fuse Management Console, an OSGI fragment bundle must be implemented.

7.1. Controlling Access to the Fuse Management Console

Contents of the Fragment Bundle

A fragment bundle that enables the jolokia-access.xml policy file can be used to restrict access without altering the original hawtio-web.war. A fragment bundle that contains the jolokia-access.xml policy file within the CORS configuration can be added to limit access to a certain host by using <allow-origin> sections within the <cors> sections. The <allow-origin> section can contain the origin URL provided by browsers with the Origin: header, or a wildcard specification with *. For example:
<cors>
   <!-- Allow cross origin access from www.jolokia.org ... -->
   <allow-origin>http://www.jolokia.org</allow-origin>
   <!-- ... and all servers from jmx4perl.org with any protocol -->
   <allow-origin>*://*.jmx4perl.org</allow-origin>
   <!-- Check for the proper origin on the server side, too -->
   <strict-checking/>
</cors>
Build the fragment bundle according to the insructions in the OSGI specifications at OSGi Developer Downloads. For more information about OSGi dependencies see Managing OSGi dependencies. Ensure that you add the Fragment-Host header in the Manifest.MF bundle. After building the fragment bundle, use the following command to install it:
install file:///Location_Of_Fragment_Bundle_file/hawtio-web-fragment/target/hawtio-web-fragment-1.2-redhat-379.jar
Hawtio-web must be refreshed to pick up the fragment bundle. Use the follwing comands to refresh the hawtio-web bundle:
To find out the hawtio-web bundle ID:
JBossFuse:karaf@root> la | grep -i hawtio
Identify the number for the hawtio-web bundle. In the example below, the number is 253:
[ 253] [Active     ] [            ] [       ] [   80] hawtio :: hawtio-web (1.4.0.redhat-621083)
Refresh the hawtio-web bundle using the following command:
JBossFuse:karaf@root> refresh 253
Repeat the la | grep -i hawtio command to see the hawtio-web line with the fragment bundle attached:
[ 253] [Active     ] [            ] [       ] [   80] hawtio :: hawtio-web (1.4.0.redhat-621083), Fragments: 270
Red Hat logoGithubRedditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

© 2024 Red Hat, Inc.