This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 9 Next »

From G-Reg 4.5.0 it is possible to audit Lifecycle operations. This means we capture all the Lifecycle operations of a particular resource. Lifecycle auditing is turned ON by default. Auditing can be turned OFF from the Lifecycle configuration. This can be done by setting audit=false in the lifecycle element in the Lifecycle configuration.

 

<aspect name="ServiceLifeCycle" class="org.wso2.carbon.governance.registry.extensions.aspects.DefaultLifeCycle">
    <configuration type="literal">
        <lifecycle audit=false>
            <scxml xmlns="http://www.w3.org/2005/07/scxml"
                   version="1.0"
                   initialstate="...">
                <state id="...">
			...
                </state>
            </scxml>
        </lifecycle>
    </configuration>
</aspect>

Since the audit functionality is defined per Lifecycle only the information related to that Lifecycle would get audited and based on the configuration, all the resources associated with that lifecycle are audited.


Audit logs are kept as a resource in G-Reg. These resources get stored under "/_system/governance/repository/components/org.wso2.carbon.governance/lifecycles/history" collection. A resource is created for every resource/collection that is associated with a Lifecycle. The name of this resource is made by replacing all the "/" with "_" of its full path. Given below is an example log resource created as a result of Lifecycle operations on a Service named foo.



Audit logs are kept as a XML files. A sample audit log is as follows.

 

<lifecycleHistory>
	<item order="3" user="admin" state="Development" targetState="Testing" originalPath="/_system/governance/trunk/services/bar/foo">
      		<action type="transition" name="Promote">
			<executors>
			<executor name="org.wso2.carbon.governance.registry.extensions.executors.ServiceVersionExecutor">
			<operations>
				<operation>
					<info>/_system/governance/branches/testing/services/bar/1.0.0/foo created</info>
				</operation>
			</operations>
			</executor>
			</executors>
			</action>
	</item>
	<item order="2" user="admin" state="Development" originalPath="/_system/governance/trunk/services/bar/foo">
		<action type="itemClick" name="QoS Created">
			<value>value:true</value>
		</action>
	</item>
	<item order="1" user="admin" state="Development" originalPath="/_system/governance/trunk/services/bar/foo">
		<action type="itemClick" name="WSDL, Schema Created">
			<value>value:true</value>
		</action>
	</item>
	<item order="0" user="admin" state="Development" originalPath="/_system/governance/trunk/services/bar/foo">
		<action type="itemClick" name="Code Completed">
			<value>value:true</value>
		</action>
	</item>
</lifecycleHistory>
  • No labels