Skip to content

Support for SSL on ArcadeDB HTTP server #775

Closed

Description

@lvca

Discussed in #751

Originally posted by lucian-cm January 9, 2023
I love the the multi model database concept that arcadedb is providing.
I am having difficulties setting up Arcadedb to run in embedded mode (https://docs.arcadedb.com/#Embedded-Server) using SSL configuration.

I am using com.arcadedb:arcadedb-server:22.11.1
I tried configuring ssl.enabled to true and also provided the rest of the ssl properties documented in the official docs at https://docs.arcadedb.com/#Settings
(ssl.keyStore, ssl.keyStorePass, ssl.trustStore, ssl.trustStorePass) but still Undertow is starting just on HTTP listener only.
image

Tried starting the Arcadedb server using code similar to below:

ContextConfiguration embeddedArcadeDbServerConfig = new ContextConfiguration();

/**
set up SERVER_ROOT_PATH, SERVER_DATABASE_DIRECTORY, SERVER_DATABASE_LOADATSTARTUP, BUCKET_DEFAULT_PAGE_SIZE  and HA_ENABLED keys in a very simple manner (non ha with local file system) and database can be used and is created on the file system.
**/
embeddedArcadeDbServerConfig.setValue("ssl.enabled", Boolean.TRUE);
embeddedArcadeDbServerConfig.setValue("ssl.trustStore", "/path/to/truststore"); // JKS truststore
embeddedArcadeDbServerConfig.setValue("ssl.truststorePass", "truststore_password_cleartext");
embeddedArcadeDbServerConfig.setValue("ssl.keyStore", "/path/to/keystore"); // JKS keystore
embeddedArcadeDbServerConfig.setValue("ssl.keyStorePass", "keystore_password_cleartext");

ArcadeDBServer arcadedbServer = new ArcadeDBServer(embeddedArcadeDbServerConfig);
arcadedbServer.start();

only http listener is added for Undertow irrespective of ssl.enabled=true or ssl.enabled=false
image

Can you provide some guidance on how to achieve this use case?

Activity

  1. added
    enhancement
    on Jan 16, 2023
  2. added this to the 23.1.2 milestone on Jan 16, 2023
  3. self-assigned this
    on Jan 16, 2023
  4. lvca commented on Jan 16, 2023

    @lvca
    MemberAuthor

    This is now supported in the latest main branch.

    configuration.setValue(GlobalConfiguration.NETWORK_USE_SSL, true);
    configuration.setValue(GlobalConfiguration.NETWORK_SSL_KEYSTORE, "src/test/resources/master.jks");
    configuration.setValue(GlobalConfiguration.NETWORK_SSL_KEYSTORE_PASSWORD, "keypassword");
    configuration.setValue(GlobalConfiguration.NETWORK_SSL_TRUSTSTORE, "src/test/resources/master.jks");
    configuration.setValue(GlobalConfiguration.NETWORK_SSL_TRUSTSTORE_PASSWORD, "storepassword");

    Note that the default port for HTTPs is configured under the new global setting:

      SERVER_HTTPS_INCOMING_PORT("arcadedb.server.httpsIncomingPort",
          "TCP/IP port number used for incoming HTTPS connections. Specify a single port or a range `<from-<to>`. Default is 2490-2499 to accept a range of ports in case they are occupied.",
          String.class, "2490-2499"),

    And by default is from 2490 to 2499.

  5. lvca commented on Jan 16, 2023

    @lvca
    MemberAuthor
  6. changed the title [-]How to enable ssl configuration?[/-] [+]Support for SSL on ArcadeDB HTTP server[/+] on Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancement

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions