[ 
https://issues.apache.org/jira/browse/KNOX-2399?focusedWorklogId=459256&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-459256
 ]

ASF GitHub Bot logged work on KNOX-2399:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 15/Jul/20 12:01
            Start Date: 15/Jul/20 12:01
    Worklog Time Spent: 10m 
      Work Description: smolnar82 commented on a change in pull request #361:
URL: https://github.com/apache/knox/pull/361#discussion_r454998470



##########
File path: 
gateway-server/src/main/java/org/apache/knox/gateway/services/token/impl/ZookeeperTokenStateService.java
##########
@@ -0,0 +1,52 @@
+/*
+ * 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.knox.gateway.services.token.impl;
+
+import static org.apache.knox.gateway.services.ServiceType.ALIAS_SERVICE;
+
+import java.util.Map;
+
+import org.apache.knox.gateway.config.GatewayConfig;
+import org.apache.knox.gateway.services.GatewayServices;
+import org.apache.knox.gateway.services.ServiceLifecycleException;
+import org.apache.knox.gateway.services.factory.AliasServiceFactory;
+import 
org.apache.knox.gateway.services.security.impl.ZookeeperRemoteAliasService;
+
+/**
+ * A Zookeeper Token State Service is actually an Alias based TSS where the 
'alias service' happens to be the 'zookeeper' implementation.
+ * This means the only important thing that should be overridden here is the 
init method where the underlying alias service is configured
+ * properly.
+ */
+public class ZookeeperTokenStateService extends AliasBasedTokenStateService {

Review comment:
       Added a brand new test class that actually starts-up a ZK cluster and 
the new ZK Token State Service stores the token aliases there: 
`org.apache.knox.gateway.services.token.impl.ZookeeperTokenStateServiceTest`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 459256)
    Time Spent: 3h 10m  (was: 3h)

> Implement ZK token state service
> --------------------------------
>
>                 Key: KNOX-2399
>                 URL: https://issues.apache.org/jira/browse/KNOX-2399
>             Project: Apache Knox
>          Issue Type: Task
>    Affects Versions: 1.4.0
>            Reporter: Sandor Molnar
>            Assignee: Sandor Molnar
>            Priority: Major
>             Fix For: 1.5.0
>
>          Time Spent: 3h 10m
>  Remaining Estimate: 0h
>
> Implement a new {{TokenStateService}} implementation which stores/fetches 
> token related metadata in Zookeeper. The new service should be configurable 
> to directly go to Zookeeper or use some local cache (e.g. a local alias 
> service).



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to