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

Redfish: Violations: /redfish/v1/Managers/bmc/Truststore/Certificates #119

Open
gtmills opened this issue Feb 21, 2020 · 9 comments
Open
Labels
bug Something isn't working

Comments

@gtmills
Copy link
Member

gtmills commented Feb 21, 2020

  1. A certificate collection can only be implemented at these paths:
    https://redfish.dmtf.org/schemas/v1/CertificateCollection_v1.xml

The options under Managers are:
/redfish/v1/Managers/{ManagerId}/RemoteAccountService/Accounts/{ManagerAccountId}/Certificates
/redfish/v1/Managers/{ManagerId}/RemoteAccountService/ActiveDirectory/Certificates
/redfish/v1/Managers/{ManagerId}/RemoteAccountService/LDAP/Certificates
/redfish/v1/Managers/{ManagerId}/RemoteAccountService/ExternalAccountProviders/{ExternalAccountProviderId}/Certificates
/redfish/v1/Managers/{ManagerId}/NetworkProtocol/HTTPS/Certificates

  1. If /redfish/v1/Managers/bmc/Truststore/Certificates is a path; /redfish/v1/Managers/bmc/Truststore should also be a valid path.
$curl -k https://${bmc}/redfish/v1/Managers/bmc
...
  "Oem": {
    "@odata.context": "/redfish/v1/$metadata#OemManager.Oem",
    "@odata.id": "/redfish/v1/Managers/bmc#/Oem",
    "@odata.type": "#OemManager.Oem",
    "OpenBmc": {
      "@odata.context": "/redfish/v1/$metadata#OemManager.OpenBmc",
      "@odata.id": "/redfish/v1/Managers/bmc#/Oem/OpenBmc",
      "@odata.type": "#OemManager.OpenBmc",
      "Certificates": {
        "@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates"
      }
    }
  },
...

$ curl -k https://${bmc}/redfish/v1/Managers/bmc/Truststore
Not Found

$ curl -k https://${bmc}/redfish/v1/Managers/bmc/Truststore/Certificates
{
  "@odata.context": "/redfish/v1/$metadata#CertificateCollection.CertificateCollection",
  "@odata.id": "/redfish/v1/Managers/bmc/Truststore/Certificates/",
  "@odata.type": "#CertificateCollection.CertificateCollection",
  "Description": "A Collection of TrustStore certificate instances",
  "Members": [],
  "Members@odata.count": 0,
  "Name": "TrustStore Certificates Collection"
}
@gtmills
Copy link
Member Author

gtmills commented Feb 21, 2020

@devenrao

@devenrao
Copy link
Contributor

If your question is about the below URL should be a valid path, then I guess you are correct, but there is nothing that we can show there when compared to the other URL''s like HPPTS and LDAP.

$ curl -k https://${bmc}/redfish/v1/Managers/bmc/Truststore
Not Found

@gtmills
Copy link
Member Author

gtmills commented Sep 11, 2020

@devenrao This violates the Redfish spec, Redfish has expanded where the Certificate schema can be implemented.

https://redfish.dmtf.org/schemas/v1/CertificateCollection_v1.xml

/redfish/v1/AccountService/Accounts/{ManagerAccountId}/Certificates /redfish/v1/AccountService/ActiveDirectory/Certificates /redfish/v1/AccountService/LDAP/Certificates /redfish/v1/AccountService/ExternalAccountProviders/{ExternalAccountProviderId}/Certificates /redfish/v1/Managers/{ManagerId}/RemoteAccountService/Accounts/{ManagerAccountId}/Certificates /redfish/v1/Managers/{ManagerId}/RemoteAccountService/ActiveDirectory/Certificates /redfish/v1/Managers/{ManagerId}/RemoteAccountService/LDAP/Certificates /redfish/v1/Managers/{ManagerId}/RemoteAccountService/ExternalAccountProviders/{ExternalAccountProviderId}/Certificates /redfish/v1/Managers/{ManagerId}/NetworkProtocol/HTTPS/Certificates /redfish/v1/Systems/{ComputerSystemId}/Boot/Certificates /redfish/v1/CompositionService/ResourceBlocks/{ResourceBlockId}/Systems/{ComputerSystemId}/Boot/Certificates /redfish/v1/ResourceBlocks/{ResourceBlockId}/Systems/{ComputerSystemId}/Boot/Certificates /redfish/v1/Systems/{ComputerSystemId}/SecureBoot/SecureBootDatabases/{DatabaseId}/Certificates /redfish/v1/CompositionService/ResourceBlocks/{ResourceBlockId}/Systems/{ComputerSystemId}/SecureBoot/SecureBootDatabases/{DatabaseId}/Certificates /redfish/v1/ResourceBlocks/{ResourceBlockId}/Systems/{ComputerSystemId}/SecureBoot/SecureBootDatabases/{DatabaseId}/Certificates

Can we move to one of these ?

@edtanous edtanous added the bug Something isn't working label Oct 19, 2020
@jiaqingz-intel
Copy link
Contributor

Here TrustStore lists certificates trusted by BMC (like ca certificates). In Redfish spec, there is no URL for this purpose. I think that's why it was added initially.

/​redfish/​v1/​Managers/​{ManagerId}/​Certificates is "The link to a collection of certificates for device identity and attestation." It cannot be used here.

@edtanous
Copy link
Contributor

In Redfish spec, there is no URL for this purpose.

Manager.Certificates would generally be used for this purpose, which was added in 2021.2

@pboyd04
Copy link

pboyd04 commented Nov 6, 2023

If I understand the use case here the better place would actually be: /redfish/v1/Managers/{ManagerId}/SecurityPolicy/TLS/Client/TrustedCertificates

@jiaqingz-intel
Copy link
Contributor

If I understand the use case here the better place would actually be: /redfish/v1/Managers/{ManagerId}/SecurityPolicy/TLS/Client/TrustedCertificates

Agreed. But SecurityPolicy is introduced in Manager v1.16+, now bmcweb is still using Manager v1.14, a schema verison bump is needed.

@edtanous
Copy link
Contributor

If I understand the use case here the better place would actually be: /redfish/v1/Managers/{ManagerId}/SecurityPolicy/TLS/Client/TrustedCertificates

Yep, this is what I meant (my message was not very clear).

@gtmills
Copy link
Member Author

gtmills commented Mar 5, 2024

This is still a problem, https://gerrit.openbmc.org/c/openbmc/bmcweb/+/61958 was an attempt to fix but needs more thought

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants