Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SS): EC key support for signing/authentication #2400

Merged
merged 6 commits into from
Nov 20, 2024

Conversation

ovidijusnortal
Copy link
Contributor

No description provided.

Copy link

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests

No Gradle build results detected.

Copy link

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
src
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.10.2 Build Scan not published

@ovidijusnortal ovidijusnortal changed the base branch from develop to XRDDEV-2695 October 31, 2024 07:00
Copy link

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
src
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.10.2 Build Scan not published

Copy link

github-actions bot commented Nov 5, 2024

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
src
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.10.2 Build Scan not published

@ovidijusnortal ovidijusnortal marked this pull request as ready for review November 5, 2024 14:24
Copy link
Contributor

@petkivim petkivim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments regarding the documentation. I leave the more detailed technical review for @ricardas-buc.

@petkivim
Copy link
Contributor

petkivim commented Nov 6, 2024

Also, the Security Server installation and user guides don't currently explain what needs to be done to switch the auth/sign key type from RSA to EC. It should be explained what's the default key type and how it can be changed. Also, the documentation should explain how changing the key type may affect backwards compatibility and interoperability between two X-Road instances in a federated setup. Probably the best approach is to add the documentation to the Security Server user guide and add a link to it in the Security Server installation guide.

Copy link

github-actions bot commented Nov 8, 2024

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
src
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.10.2 Build Scan not published

Copy link
Contributor

@petkivim petkivim left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some editorial comments.

@@ -566,6 +569,11 @@ The key can then be moved to an external host and imported to GPG keyring with t
Automated Certificate Management Environment (ACME) protocol enables automated certificate management of the authentication and sign
certificates on the Security Server. More information about the required configuration is available in the [Security Server User Guide](ug-ss_x-road_6_security_server_user_guide.md#24-configuring-acme).

### 3.7 Enabling EC keys for authentication and signing certificates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This section is missing from the Table of Contents.

Also, please update the heading:

3.7 Enabling EC Keys for Authentication and Signing Certificates

@@ -566,6 +569,11 @@ The key can then be moved to an external host and imported to GPG keyring with t
Automated Certificate Management Environment (ACME) protocol enables automated certificate management of the authentication and sign
certificates on the Security Server. More information about the required configuration is available in the [Security Server User Guide](ug-ss_x-road_6_security_server_user_guide.md#24-configuring-acme).

### 3.7 Enabling EC keys for authentication and signing certificates

Security server supports EC based authentication and signing certificates since version 7.6.0.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Security server supports
=>
Security Server supports

@@ -263,6 +264,9 @@ Doc. ID: UG-SS
- [22 Additional Security Hardening](#22-additional-security-hardening)
- [23 Passing additional parameters to psql](#23-passing-additional-parameters-to-psql)
- [24 Configuring ACME](#24-configuring-acme)
- [25 Migrating to EC based Authentication and Signing certificates](#25-migrating-to-ec-based-authentication-and-signing-certificates)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this to:

25 Migrating to EC Based Authentication and Signing Certificates

@@ -263,6 +264,9 @@ Doc. ID: UG-SS
- [22 Additional Security Hardening](#22-additional-security-hardening)
- [23 Passing additional parameters to psql](#23-passing-additional-parameters-to-psql)
- [24 Configuring ACME](#24-configuring-acme)
- [25 Migrating to EC based Authentication and Signing certificates](#25-migrating-to-ec-based-authentication-and-signing-certificates)
- [25.1 Steps to enable EC based certificates](#251-Steps-to-enable-EC-based-certificates)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this to:

25.1 Steps to Enable EC Based Certificates

@@ -263,6 +264,9 @@ Doc. ID: UG-SS
- [22 Additional Security Hardening](#22-additional-security-hardening)
- [23 Passing additional parameters to psql](#23-passing-additional-parameters-to-psql)
- [24 Configuring ACME](#24-configuring-acme)
- [25 Migrating to EC based Authentication and Signing certificates](#25-migrating-to-ec-based-authentication-and-signing-certificates)
- [25.1 Steps to enable EC based certificates](#251-Steps-to-enable-EC-based-certificates)
- [25.2 Backwards compatibility](#252-Backwards-compatibility)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this to:

25.2 Backwards Compatibility

```

## 25 Migrating to EC based Authentication and Signing certificates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this to:

25 Migrating to EC Based Authentication and Signing Certificates

## 25 Migrating to EC based Authentication and Signing certificates

### 25.1 Steps to enable EC based certificates
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update this to:

25.1 Steps to Enable EC Based Certificates

Comment on lines 3335 to 3336
The instructions how to start using EC based certificates are listed below.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider updating this:

Since version 7.6.0 Security Server supports ECDSA based authentication and signing keys. By default, both authentication and signing keys use the RSA algorithm as in previous versions. The EC algorithm can be enabled separately for authentication and/or signing keys so migration can be done in a gradual way.
The instructions on how to start using EC based keys are listed below.

Comment on lines 3352 to 3354
- Older Security Servers should be able to verify requests signed with EC keys from newer Security server.
- If older Security Server makes to request to newer Security Server,which uses EC based authentication certificate, then `TLS handshake failed` error may occur. To fix this without upgrading the older Security Server, just update on that security server `xroad-tls-ciphers` property to include EC compatible TLS cypher for example: `TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384`, read more in [UG-SYSPAR](../Manuals/ug-syspar_x-road_v6_system_parameters.md).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider updating this:

EC based keys are supported starting from X-Road version 7.6.0 (=> 7.6.0). If an X-Road instance contains Security Servers prior to version 7.6.0 (< 7.6.0), then:

  • A Security Server prior to version 7.6.0 (< 7.6.0) is able to verify requests signed with EC keys from a Security Server version 7.6.0 or later (=> 7.6.0).
  • If a Security Server prior to version 7.6.0 (< 7.6.0) makes a request to a Security Server version 7.6.0 or later (=> 7.6.0), which uses EC based authentication certificate, then TLS handshake failed error may occur. To fix this without upgrading the older Security Server, update the Security Server's xroad-tls-ciphers property to include EC compatible TLS cipher, e.g.: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384, read more in UG-SYSPAR.

make it work

Refs: XRDDEV-2694

feat(SS): EC key support for signing/authentication

fix tls issue

Refs: XRDDEV-2694

feat(SS): EC key support for signing/authentication

also make SS admin UI login page look same as CS UI

Refs: XRDDEV-2694
update documentation

Refs: XRDDEV-2694
update link in docs

Refs: XRDDEV-2695
update documentation

Refs: XRDDEV-2694
Copy link

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests

No Gradle build results detected.

Copy link

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
src
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.10.2 Build Scan not published

Refs: XRDDEV-2694
Copy link

Job Summary for Gradle

Build and test :: BuildAndPackageWithUnitTests
Gradle Root Project Requested Tasks Gradle Version Build Outcome Build Scan®
src
build sonar test intTest runProxyTest runMetaserviceTest ru…
8.10.2 Build Scan not published

@ovidijusnortal ovidijusnortal merged commit 3b94049 into XRDDEV-2695 Nov 20, 2024
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants