Skip to content

Suggestion: a developer friendly, secure API聽#240

Closed

Description

@lukaszmakuch

Hi! 馃憢

I'd like to thank everyone who has ever worked on this library, as it has helped me build things I wouldn't have built otherwise.

Because I like it so much, I must tell you that I noticed some security issues which I believe could be avoided if the API was simpler.

I'd like to propose adding a high-level API that makes our apps harder to hack. Here's how it'd look:

node = getTheOnlySignedNodeOrNull(xml, publicKey)

and

nodesArray = getSignedNodes(xml, publicKey)

You can read the rationale behind it in this blog post - Your XML security library is sabotaging your work. Here's what you can do about it. It's evident verifying signatures poses a real challenge. An example is described in a post titled Are XML Signatures secure?.

The current, low-level API doesn't have to be removed, so everything can be backward-compatible.

The new, safer API can be built on top of the existing one.

Should we help developers deliver secure solutions?

Activity

  1. djaqua commented on Feb 17, 2023

    @djaqua
    Contributor

    Yes, I love this, personally, but I think it's worth having a discussion around making the high level API as flexible as possible. We're in the process of knocking out some real low-level pain points and potentially some redesign.

    The API you're proposing is basically a facade over the package that ensures that clients successfully accomplish what they mean to, right?

    CC @LoneRifle @cjbarth

  2. lukaszmakuch commented on Feb 20, 2023

    @lukaszmakuch
    Author

    You're right @djaqua. What I'm proposing is a facade over the current API. I have actually implemented something like that for a client of mine so that reading "safe" data from XMLs is not a footgun.

    I'd love to hear more about the ideas for the potential redesign. What are the goals you're aiming for with this redesign?

  3. cjbarth commented on Apr 18, 2023

    @cjbarth
    Contributor

    @djaqua @lukaszmakuch , how's this discussion going?

  4. lukaszmakuch commented on Apr 19, 2023

    @lukaszmakuch
    Author

    @djaqua @lukaszmakuch , how's this discussion going?

    I don鈥檛 have any updates.

  5. cjbarth commented on May 29, 2023

    @cjbarth
    Contributor

    Would either @djaqua or @lukaszmakuch like to propose such an API, either here or in a PR so that this can keep moving forward?

  6. djaqua commented on Jun 11, 2023

    @djaqua
    Contributor

    @cjbarth & @lukaszmakuch -- check out #304
    I think the Facade would easily and effectively knock out high level goals 1 & 2. I would be glad to donate the Facade I have made for my own use. It would take me an evening or two to clean it up and add JSDocs. But .... I don't want to start coding until we have a real serious discussion about where we want to take this project.

  7. LoneRifle commented on Jun 11, 2023

    @LoneRifle
    Collaborator

    Could we enable discussions on this repo? It would facilitate discourse better than GitHub Issues

  8. djaqua commented on Jun 11, 2023

    @djaqua
    Contributor

    I have no idea how, but yes, I am most definitely in favor of that.

  9. djaqua commented on Jun 12, 2023

    @djaqua
    Contributor

    Also, @cjbarth @LoneRifle do you guys use Microsoft Teams? I can't believe I'm about to say this, but ... I actually think its a pretty neat tool. Can do virtual conferencing, share and manage notes, create TODO lists, and lots of other project management stuff. I think we can collaborate for free, but if you guys hate it, then lets not use it. Just putting it out there as an option.

  10. locked and limited conversation to collaborators on Jun 12, 2023
  11. converted this issue into a discussion #307 on Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions