mirror of
https://github.com/gyurix1968/guacamole-client.git
synced 2025-09-06 13:17:41 +00:00
GUACAMOLE-1629: Add configuration properties and associated translations.
This commit is contained in:
@@ -21,8 +21,10 @@ package org.apache.guacamole.vault.ksm;
|
||||
|
||||
import org.apache.guacamole.GuacamoleException;
|
||||
import org.apache.guacamole.vault.VaultAuthenticationProviderModule;
|
||||
import org.apache.guacamole.vault.ksm.conf.KsmAttributeService;
|
||||
import org.apache.guacamole.vault.ksm.conf.KsmConfigurationService;
|
||||
import org.apache.guacamole.vault.ksm.secret.KsmSecretService;
|
||||
import org.apache.guacamole.vault.conf.VaultAttributeService;
|
||||
import org.apache.guacamole.vault.conf.VaultConfigurationService;
|
||||
import org.apache.guacamole.vault.ksm.secret.KsmClient;
|
||||
import org.apache.guacamole.vault.ksm.secret.KsmRecordService;
|
||||
@@ -51,6 +53,7 @@ public class KsmAuthenticationProviderModule
|
||||
// Bind services specific to Keeper Secrets Manager
|
||||
bind(KsmClient.class);
|
||||
bind(KsmRecordService.class);
|
||||
bind(VaultAttributeService.class).to(KsmAttributeService.class);
|
||||
bind(VaultConfigurationService.class).to(KsmConfigurationService.class);
|
||||
bind(VaultSecretService.class).to(KsmSecretService.class);
|
||||
}
|
||||
|
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
* 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.guacamole.vault.ksm.conf;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
import org.apache.guacamole.form.Form;
|
||||
import org.apache.guacamole.form.MultilineField;
|
||||
import org.apache.guacamole.vault.conf.VaultAttributeService;
|
||||
|
||||
import com.google.inject.Singleton;
|
||||
|
||||
/**
|
||||
* A service that exposes KSM-specific attributes, allowing setting KSM
|
||||
* configuration through the admin interface.
|
||||
*/
|
||||
@Singleton
|
||||
public class KsmAttributeService implements VaultAttributeService {
|
||||
|
||||
/**
|
||||
* The name of the attribute which can contain a KSM configuration blob
|
||||
* associated with a connection group.
|
||||
*/
|
||||
public static final String KSM_CONFIGURATION_ATTRIBUTE = "ksm-config";
|
||||
|
||||
/**
|
||||
* All attributes related to configuring the KSM vault on a
|
||||
* per-connection-group basis.
|
||||
*/
|
||||
public static final Form KSM_CONFIGURATION_FORM = new Form("ksm-config",
|
||||
Arrays.asList(new MultilineField(KSM_CONFIGURATION_ATTRIBUTE)));
|
||||
|
||||
/**
|
||||
* All KSM-specific connection group attributes, organized by form.
|
||||
*/
|
||||
public static final Collection<Form> KSM_CONNECTION_GROUP_ATTRIBUTES =
|
||||
Collections.unmodifiableCollection(Arrays.asList(KSM_CONFIGURATION_FORM));
|
||||
|
||||
@Override
|
||||
public Collection<Form> getConnectionGroupAttributes() {
|
||||
return KSM_CONNECTION_GROUP_ATTRIBUTES;
|
||||
}
|
||||
|
||||
}
|
@@ -0,0 +1,12 @@
|
||||
{
|
||||
|
||||
"DATA_SOURCE_KEEPER_SECRETS_MANAGER" : {
|
||||
"NAME" : "Keeper Secrets Manager"
|
||||
},
|
||||
|
||||
"CONNECTION_GROUP_ATTRIBUTES" : {
|
||||
"SECTION_HEADER_KSM_CONFIG" : "Keeper Secrets Manager",
|
||||
"FIELD_HEADER_KSM_CONFIG" : "KSM Service Configuration "
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user