You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by st...@apache.org on 2016/03/24 13:08:40 UTC
[08/51] [abbrv] ambari git commit: Repository version creator
Repository version creator
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/2ece936e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/2ece936e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/2ece936e
Branch: refs/heads/audit_logging
Commit: 2ece936e55ae380f27152b22825c5a866098ca67
Parents: 38be6ef
Author: Daniel Gergely <dg...@hortonworks.com>
Authored: Mon Feb 22 10:00:14 2016 +0100
Committer: Toader, Sebastian <st...@hortonworks.com>
Committed: Thu Mar 24 13:06:45 2016 +0100
----------------------------------------------------------------------
.../AddRepositoryVersionRequestAuditEvent.java | 129 +++++++++++++
...hangeRepositoryVersionRequestAuditEvent.java | 129 +++++++++++++
...eleteRepositoryVersionRequestAuditEvent.java | 96 ++++++++++
.../RepositoryVersionEventCreator.java | 184 +++++++++++++++++++
.../server/controller/ControllerModule.java | 2 +
5 files changed, 540 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ece936e/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/AddRepositoryVersionRequestAuditEvent.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/AddRepositoryVersionRequestAuditEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/AddRepositoryVersionRequestAuditEvent.java
new file mode 100644
index 0000000..879582c
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/AddRepositoryVersionRequestAuditEvent.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.audit.request.event;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ambari.server.audit.request.RequestAuditEvent;
+
+public class AddRepositoryVersionRequestAuditEvent extends RequestAuditEvent {
+
+ public static class AddRepositoryVersionAuditEventBuilder extends RequestAuditEventBuilder<AddRepositoryVersionRequestAuditEvent, AddRepositoryVersionAuditEventBuilder> {
+
+ private String stackName;
+
+ private String displayName;
+
+ private String stackVersion;
+
+ private String repoVersion;
+
+ private Map<String, List<Map<String, String>>> repos;
+
+ public AddRepositoryVersionAuditEventBuilder() {
+ super.withOperation("Repository version addition");
+ }
+
+ @Override
+ protected AddRepositoryVersionRequestAuditEvent newAuditEvent() {
+ return new AddRepositoryVersionRequestAuditEvent(this);
+ }
+
+ /**
+ * Appends to the event the details of the incoming request.
+ * @param builder builder for the audit event details.
+ */
+ @Override
+ protected void buildAuditMessage(StringBuilder builder) {
+ super.buildAuditMessage(builder);
+
+ builder.append(", Stack(")
+ .append(stackName)
+ .append("), Stack version(")
+ .append(stackVersion)
+ .append("), Display name(")
+ .append(displayName)
+ .append("), Repo version(")
+ .append(repoVersion)
+ .append("), Repositories(");
+
+ if(!repos.isEmpty()) {
+ builder.append(System.lineSeparator());
+ }
+
+ for(Map.Entry<String, List<Map<String, String>>> repo : repos.entrySet()) {
+ builder.append("Operating system: ").append(repo.getKey());
+ builder.append(System.lineSeparator());
+ for(Map<String, String> properties : repo.getValue()) {
+ builder.append(" Repository ID(").append(properties.get("repo_id"));
+ builder.append("), Repository name(").append(properties.get("repo_name"));
+ builder.append("), Base url(").append(properties.get("base_url")).append(")");
+ builder.append(System.lineSeparator());
+ }
+ }
+
+ builder.append(")");
+ }
+
+ public AddRepositoryVersionAuditEventBuilder withStackName(String stackName) {
+ this.stackName = stackName;
+ return this;
+ }
+
+ public AddRepositoryVersionAuditEventBuilder withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ public AddRepositoryVersionAuditEventBuilder withStackVersion(String stackVersion) {
+ this.stackVersion = stackVersion;
+ return this;
+ }
+
+ public AddRepositoryVersionAuditEventBuilder withRepoVersion(String repoVersion) {
+ this.repoVersion = repoVersion;
+ return this;
+ }
+
+ public AddRepositoryVersionAuditEventBuilder withRepos(Map<String, List<Map<String, String>>> repos) {
+ this.repos = repos;
+ return this;
+ }
+ }
+
+ protected AddRepositoryVersionRequestAuditEvent() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected AddRepositoryVersionRequestAuditEvent(AddRepositoryVersionAuditEventBuilder builder) {
+ super(builder);
+ }
+
+ /**
+ * Returns an builder for {@link AddRepositoryVersionRequestAuditEvent}
+ * @return a builder instance
+ */
+ public static AddRepositoryVersionAuditEventBuilder builder() {
+ return new AddRepositoryVersionAuditEventBuilder();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ece936e/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/ChangeRepositoryVersionRequestAuditEvent.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/ChangeRepositoryVersionRequestAuditEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/ChangeRepositoryVersionRequestAuditEvent.java
new file mode 100644
index 0000000..0089780
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/ChangeRepositoryVersionRequestAuditEvent.java
@@ -0,0 +1,129 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.audit.request.event;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ambari.server.audit.request.RequestAuditEvent;
+
+public class ChangeRepositoryVersionRequestAuditEvent extends RequestAuditEvent {
+
+ public static class ChangeRepositoryVersionAuditEventBuilder extends RequestAuditEventBuilder<ChangeRepositoryVersionRequestAuditEvent, ChangeRepositoryVersionAuditEventBuilder> {
+
+ private String stackName;
+
+ private String displayName;
+
+ private String stackVersion;
+
+ private String repoVersion;
+
+ private Map<String, List<Map<String, String>>> repos;
+
+ public ChangeRepositoryVersionAuditEventBuilder() {
+ super.withOperation("Repository version change");
+ }
+
+ @Override
+ protected ChangeRepositoryVersionRequestAuditEvent newAuditEvent() {
+ return new ChangeRepositoryVersionRequestAuditEvent(this);
+ }
+
+ /**
+ * Appends to the event the details of the incoming request.
+ * @param builder builder for the audit event details.
+ */
+ @Override
+ protected void buildAuditMessage(StringBuilder builder) {
+ super.buildAuditMessage(builder);
+
+ builder.append(", Stack(")
+ .append(stackName)
+ .append("), Stack version(")
+ .append(stackVersion)
+ .append("), Display name(")
+ .append(displayName)
+ .append("), Repo version(")
+ .append(repoVersion)
+ .append("), Repositories(");
+
+ if(!repos.isEmpty()) {
+ builder.append(System.lineSeparator());
+ }
+
+ for(Map.Entry<String, List<Map<String, String>>> repo : repos.entrySet()) {
+ builder.append("Operating system: ").append(repo.getKey());
+ builder.append(System.lineSeparator());
+ for(Map<String, String> properties : repo.getValue()) {
+ builder.append(" Repository ID(").append(properties.get("repo_id"));
+ builder.append("), Repository name(").append(properties.get("repo_name"));
+ builder.append("), Base url(").append(properties.get("base_url")).append(")");
+ builder.append(System.lineSeparator());
+ }
+ }
+
+ builder.append(")");
+ }
+
+ public ChangeRepositoryVersionAuditEventBuilder withStackName(String stackName) {
+ this.stackName = stackName;
+ return this;
+ }
+
+ public ChangeRepositoryVersionAuditEventBuilder withDisplayName(String displayName) {
+ this.displayName = displayName;
+ return this;
+ }
+
+ public ChangeRepositoryVersionAuditEventBuilder withStackVersion(String stackVersion) {
+ this.stackVersion = stackVersion;
+ return this;
+ }
+
+ public ChangeRepositoryVersionAuditEventBuilder withRepoVersion(String repoVersion) {
+ this.repoVersion = repoVersion;
+ return this;
+ }
+
+ public ChangeRepositoryVersionAuditEventBuilder withRepos(Map<String, List<Map<String, String>>> repos) {
+ this.repos = repos;
+ return this;
+ }
+ }
+
+ protected ChangeRepositoryVersionRequestAuditEvent() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected ChangeRepositoryVersionRequestAuditEvent(ChangeRepositoryVersionAuditEventBuilder builder) {
+ super(builder);
+ }
+
+ /**
+ * Returns an builder for {@link ChangeRepositoryVersionRequestAuditEvent}
+ * @return a builder instance
+ */
+ public static ChangeRepositoryVersionAuditEventBuilder builder() {
+ return new ChangeRepositoryVersionAuditEventBuilder();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ece936e/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/DeleteRepositoryVersionRequestAuditEvent.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/DeleteRepositoryVersionRequestAuditEvent.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/DeleteRepositoryVersionRequestAuditEvent.java
new file mode 100644
index 0000000..25c3dc1
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/event/DeleteRepositoryVersionRequestAuditEvent.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.audit.request.event;
+
+import java.util.List;
+import java.util.Map;
+
+import org.apache.ambari.server.audit.request.RequestAuditEvent;
+
+public class DeleteRepositoryVersionRequestAuditEvent extends RequestAuditEvent {
+
+ public static class DeleteRepositoryVersionAuditEventBuilder extends RequestAuditEventBuilder<DeleteRepositoryVersionRequestAuditEvent, DeleteRepositoryVersionAuditEventBuilder> {
+
+ private String stackName;
+
+ private String stackVersion;
+
+ private String repoVersion;
+
+ public DeleteRepositoryVersionAuditEventBuilder() {
+ super.withOperation("Repository version removal");
+ }
+
+ @Override
+ protected DeleteRepositoryVersionRequestAuditEvent newAuditEvent() {
+ return new DeleteRepositoryVersionRequestAuditEvent(this);
+ }
+
+ /**
+ * Appends to the event the details of the incoming request.
+ * @param builder builder for the audit event details.
+ */
+ @Override
+ protected void buildAuditMessage(StringBuilder builder) {
+ super.buildAuditMessage(builder);
+
+ builder.append(", Stack(")
+ .append(stackName)
+ .append("), Stack version(")
+ .append(stackVersion)
+ .append("), Repo version ID(")
+ .append(repoVersion)
+ .append(")");
+ }
+
+ public DeleteRepositoryVersionAuditEventBuilder withStackName(String stackName) {
+ this.stackName = stackName;
+ return this;
+ }
+
+ public DeleteRepositoryVersionAuditEventBuilder withStackVersion(String stackVersion) {
+ this.stackVersion = stackVersion;
+ return this;
+ }
+
+ public DeleteRepositoryVersionAuditEventBuilder withRepoVersion(String repoVersion) {
+ this.repoVersion = repoVersion;
+ return this;
+ }
+ }
+
+ protected DeleteRepositoryVersionRequestAuditEvent() {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ protected DeleteRepositoryVersionRequestAuditEvent(DeleteRepositoryVersionAuditEventBuilder builder) {
+ super(builder);
+ }
+
+ /**
+ * Returns an builder for {@link DeleteRepositoryVersionRequestAuditEvent}
+ * @return a builder instance
+ */
+ public static DeleteRepositoryVersionAuditEventBuilder builder() {
+ return new DeleteRepositoryVersionAuditEventBuilder();
+ }
+
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ece936e/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
new file mode 100644
index 0000000..7d5de64
--- /dev/null
+++ b/ambari-server/src/main/java/org/apache/ambari/server/audit/request/eventcreator/RepositoryVersionEventCreator.java
@@ -0,0 +1,184 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ambari.server.audit.request.eventcreator;
+
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.apache.ambari.server.api.services.Request;
+import org.apache.ambari.server.api.services.Result;
+import org.apache.ambari.server.api.services.ResultStatus;
+import org.apache.ambari.server.audit.AuditEvent;
+import org.apache.ambari.server.audit.request.RequestAuditEventCreator;
+import org.apache.ambari.server.audit.request.event.AddRepositoryRequestAuditEvent;
+import org.apache.ambari.server.audit.request.event.AddRepositoryVersionRequestAuditEvent;
+import org.apache.ambari.server.audit.request.event.ChangeRepositoryVersionRequestAuditEvent;
+import org.apache.ambari.server.audit.request.event.DeleteRepositoryVersionRequestAuditEvent;
+import org.apache.ambari.server.audit.request.event.UpdateRepositoryRequestAuditEvent;
+import org.apache.ambari.server.controller.spi.Resource;
+import org.apache.ambari.server.controller.utilities.PropertyHelper;
+import org.joda.time.DateTime;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.User;
+
+/**
+ * This creator handles privilege requests
+ * For resource type {@link Resource.Type#Repository}
+ * and request types {@link Request.Type#POST}, {@link Request.Type#PUT} and {@link Request.Type#DELETE}
+ */
+public class RepositoryVersionEventCreator implements RequestAuditEventCreator {
+
+ /**
+ * Set of {@link Request.Type}s that are handled by this plugin
+ */
+ private Set<Request.Type> requestTypes = new HashSet<Request.Type>();
+
+ {
+ requestTypes.add(Request.Type.POST);
+ requestTypes.add(Request.Type.PUT);
+ requestTypes.add(Request.Type.DELETE);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Set<Request.Type> getRequestTypes() {
+ return requestTypes;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Set<Resource.Type> getResourceTypes() {
+ return Collections.singleton(Resource.Type.RepositoryVersion);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Set<ResultStatus.STATUS> getResultStatuses() {
+ return null;
+ }
+
+ @Override
+ public AuditEvent createAuditEvent(Request request, Result result) {
+ String username = ((User) SecurityContextHolder.getContext().getAuthentication().getPrincipal()).getUsername();
+
+ switch(request.getRequestType()) {
+ case POST:
+ return AddRepositoryVersionRequestAuditEvent.builder()
+ .withTimestamp(DateTime.now())
+ .withRequestType(request.getRequestType())
+ .withResultStatus(result.getStatus())
+ .withUrl(request.getURI())
+ .withRemoteIp(request.getRemoteAddress())
+ .withUserName(username)
+ .withStackName(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "stack_name")))
+ .withStackVersion(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "stack_version")))
+ .withDisplayName(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "display_name")))
+ .withRepoVersion(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "repository_version")))
+ .withRepos(getRepos(request))
+ .build();
+ case PUT:
+ return ChangeRepositoryVersionRequestAuditEvent.builder()
+ .withTimestamp(DateTime.now())
+ .withRequestType(request.getRequestType())
+ .withResultStatus(result.getStatus())
+ .withUrl(request.getURI())
+ .withRemoteIp(request.getRemoteAddress())
+ .withUserName(username)
+ .withStackName(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "stack_name")))
+ .withStackVersion(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "stack_version")))
+ .withDisplayName(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "display_name")))
+ .withRepoVersion(getProperty(request, PropertyHelper.getPropertyId("RepositoryVersions", "repository_version")))
+ .withRepos(getRepos(request))
+ .build();
+ case DELETE:
+ return DeleteRepositoryVersionRequestAuditEvent.builder()
+ .withTimestamp(DateTime.now())
+ .withRequestType(request.getRequestType())
+ .withResultStatus(result.getStatus())
+ .withUrl(request.getURI())
+ .withRemoteIp(request.getRemoteAddress())
+ .withUserName(username)
+ .withStackName(request.getResource().getKeyValueMap().get(Resource.Type.Stack))
+ .withStackVersion(request.getResource().getKeyValueMap().get(Resource.Type.StackVersion))
+ .withRepoVersion(request.getResource().getKeyValueMap().get(Resource.Type.RepositoryVersion))
+ .build();
+ default:
+ return null;
+ }
+ }
+
+ private Map<String,List<Map<String,String>>> getRepos(Request request) {
+
+ Map<String,List<Map<String,String>>> result = new HashMap<String,List<Map<String,String>>>();
+
+ if(!request.getBody().getPropertySets().isEmpty()) {
+ if(request.getBody().getPropertySets().iterator().next().get("operating_systems") instanceof Set) {
+ Set<Object> set = (Set<Object>) request.getBody().getPropertySets().iterator().next().get("operating_systems");
+
+ for (Object entry : set) {
+ if(entry instanceof Map) {
+ Map<String, Object> map = (Map<String, Object>) entry;
+ String osType = (String) map.get(PropertyHelper.getPropertyId("OperatingSystems", "os_type"));
+ if(!result.containsKey(osType)) {
+ result.put(osType,new LinkedList<Map<String, String>>());
+ }
+ if(map.get("repositories") instanceof Set) {
+ Set<Object> repos = (Set<Object>) map.get("repositories");
+ for(Object repo : repos) {
+ if(repo instanceof Map) {
+ Map<String, String> m = (Map<String,String>) repo;
+ String repoId = m.get(PropertyHelper.getPropertyId("Repositories", "repo_id"));
+ String repo_name = m.get(PropertyHelper.getPropertyId("Repositories", "repo_name"));
+ String baseUrl = m.get(PropertyHelper.getPropertyId("Repositories", "base_url"));
+ Map<String, String> resultMap = new HashMap<>();
+ resultMap.put("repo_id", repoId);
+ resultMap.put("repo_name", repo_name);
+ resultMap.put("base_url", baseUrl);
+ result.get(osType).add(resultMap);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return result;
+ }
+
+ private String getProperty(Request request, String properyId) {
+ if(!request.getBody().getPropertySets().isEmpty()) {
+ return String.valueOf(request.getBody().getPropertySets().iterator().next().get(properyId));
+ }
+ return null;
+ }
+
+
+
+}
http://git-wip-us.apache.org/repos/asf/ambari/blob/2ece936e/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
index 9ecb345..2e03d29 100644
--- a/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
+++ b/ambari-server/src/main/java/org/apache/ambari/server/controller/ControllerModule.java
@@ -50,6 +50,7 @@ import org.apache.ambari.server.audit.request.eventcreator.PrivilegeEventCreator
import org.apache.ambari.server.audit.request.eventcreator.GroupEventCreator;
import org.apache.ambari.server.audit.request.eventcreator.MemberEventCreator;
import org.apache.ambari.server.audit.request.eventcreator.RepositoryEventCreator;
+import org.apache.ambari.server.audit.request.eventcreator.RepositoryVersionEventCreator;
import org.apache.ambari.server.audit.request.eventcreator.ServiceConfigDownloadEventCreator;
import org.apache.ambari.server.audit.request.eventcreator.UnauthorizedEventCreator;
import org.apache.ambari.server.audit.request.eventcreator.ConfigurationChangeEventCreator;
@@ -418,6 +419,7 @@ public class ControllerModule extends AbstractModule {
auditLogEventCreatorBinder.addBinding().to(ViewInstanceEventCreator.class);
auditLogEventCreatorBinder.addBinding().to(ViewPrivilegeEventCreator.class);
auditLogEventCreatorBinder.addBinding().to(RepositoryEventCreator.class);
+ auditLogEventCreatorBinder.addBinding().to(RepositoryVersionEventCreator.class);
bind(RequestAuditLogger.class).to(RequestAuditLoggerImpl.class);
}