@Override
    protected boolean isSecure(String key) {
        AuthorizationPluginInfo pluginInfo = this.metadataStore().getPluginInfo(getPluginId());

        if (pluginInfo == null
                || pluginInfo.getAuthConfigSettings() == null
                || pluginInfo.getAuthConfigSettings().getConfiguration(key) == null) {
            return false;
        }

        return pluginInfo.getAuthConfigSettings().getConfiguration(key).isSecure();
    }
@Test
    public void addConfiguration_shouldEncryptASecureVariable() throws Exception {
        PluggableInstanceSettings profileSettings = new PluggableInstanceSettings(List.of(new PluginConfiguration("password", new Metadata(true, true))));
        AuthorizationPluginInfo pluginInfo = new AuthorizationPluginInfo(pluginDescriptor("plugin_id"), profileSettings, null, null, null);

        store.setPluginInfo(pluginInfo);
        SecurityAuthConfig authConfig = new SecurityAuthConfig("id", "plugin_id");
        authConfig.addConfigurations(List.of(new ConfigurationProperty(new ConfigurationKey("password"), new ConfigurationValue("pass"))));

        assertThat(authConfig.size(), is(1));
        assertTrue(authConfig.first().isSecure());
    }