@Override
    public Set<Algorithm> getKeys(final Path file, final LoginCallback prompt) throws BackgroundException {
        final Path container = containerService.getContainer(file);
        final Set<Algorithm> keys = super.getKeys(container, prompt);
        if(container.isRoot()) {
            return keys;
        }
        try {
            final AWSKMS client = this.client(container);
            try {
                final Map<String, String> aliases = new HashMap<>();
                for(AliasListEntry entry : client.listAliases().getAliases()) {
                    aliases.put(entry.getTargetKeyId(), entry.getAliasName());
                }
                for(KeyListEntry entry : client.listKeys().getKeys()) {
                    keys.add(new AliasedAlgorithm(entry, aliases.get(entry.getKeyId())));
                }
            }
            catch(AmazonClientException e) {
                throw new AmazonServiceExceptionMappingService().map("Cannot read AWS KMS configuration", e);
            }
            finally {
                client.shutdown();
            }
        }
        catch(AccessDeniedException e) {
            log.warn(String.format("Ignore failure reading keys from KMS. %s", e.getMessage()));
            keys.add(SSE_KMS_DEFAULT);
        }
        return keys;
    }
@Test
    public void testGetKeys_ap_southeast_2() throws Exception {
        final KMSEncryptionFeature kms = new KMSEncryptionFeature(session, new S3LocationFeature(session), new S3AccessControlListFeature(session), new DisabledX509TrustManager(), new DefaultX509KeyManager());
        final Set<Encryption.Algorithm> keys = kms.getKeys(new Path("test-ap-southeast-2-cyberduck", EnumSet.of(Path.Type.volume, Path.Type.directory)), new DisabledLoginCallback());
        assertTrue(keys.contains(Encryption.Algorithm.NONE));
        assertTrue(keys.contains(S3EncryptionFeature.SSE_AES256));
        assertEquals(2, keys.size());
    }