Tag: OpenAPI

  • OpenAPI Specification: Perception vs. Reality

    OpenAPI Specification: Perception vs. Reality

    The OpenAPI Specification (OAS) (formerly known as the Swagger specification) provides a way to describe and document REST APIs and their components. It includes details on endpoints, their operations, parameters needed for the operations, expected responses for every operation, authentication methods and even annotations. OAS is an easy format to learn and read, and can be understood by both humans and machines. As you might imagine, this kind of “accessible” documentation is useful and beneficial in a number of different use cases for both development and security teams.

    Developer Relationships With OAS

    For developers, OAS can be used to generate documentation for APIs. Proper documentation can help other developers figure out how best to integrate and use these APIs with their own application.

    Even so, many developers have a love/hate relationship with OAS. Let’s face it, documenting is a far cry from developing. Although it is easy to learn, the actual act of documenting is tedious, manual and time consuming. Frankly, it’s probably one of the least glamorous parts of a developer’s job, and, therefore, many developers only do the absolute minimum. As a result, OAS can be incomplete or, in some cases, missing entirely. Not to mention, when the API is updated, how often is the OAS updated, too?

    In the case of incomplete or nonexistent documentation, developers will muddle through with trial and error, even though this can slow down the development process.

    If out-of-date OAS proves an annoyance for dev teams, what’s the impact on security?

    Security’s Relationship With OAS

    OAS can be consumed by both humans and machines, and both are critical for security’s use of OAS.

    OAS helps security teams (humans) become aware that the API exists, since its documentation is often part of the CI/CD process.

    By examining an OAS file, a security team can understand what the API is supposed to do and, from that, determine if it conforms to or violates the organization’s security policy. As an example, security teams might use the OAS to make sure that authentication and authorization are being implemented correctly, and that sensitive data, like PII, is not being exposed.

    Security teams might also deploy tools (machines) that use the OAS to enforce policy based on what’s in the documentation. As an example, the OAS may specify that, for a particular parameter, a string should be expected; it should be no more than four characters and it should contain only letters and numbers with no special characters. By validating input based on what is defined in the OAS, security tools can check that the API does what developers intend it to do.

    This plan sounds great on paper, but …

    Perception versus Reality

    Imagine a perfect world, in which every API is well-documented as part of the development process. As that API makes its way through the development pipeline, it does so hand-in-hand with an associated OAS. At the appropriate time, before production, security is made aware of the API and the OAS, the team evaluates the details, validates that the API matches policy, gives the thumbs up and the API goes into production. Security and development teams live in harmony and everyone is happy.

    We don’t live in a perfect world. Instead, we must deal with questions such as:

    • Does the OAS exist? In the most extreme cases, the OAS doesn’t even exist. It was never created as part of the development process, so it can’t be used for any sort of awareness. These misses happen more often than you think, giving rise to the problem known as shadow APIs. These APIs slip through the cracks, and make it into production with no documentation at all. While you might be saying to yourself, “Our company would never let this happen!” you should also consider that numerous APIs are stood up by development teams as a test, as part of a beta or as a quick-and-dirty way to get something done. There are more of them than you think, and these shadow APIs create unrealized risk.
    • Is the OAS complete? In slightly less-scary territory, let’s consider an incomplete OAS. You might be saying to yourself, “We have a top-notch development team, well-defined development processes and strict policies around documentation. No API makes it into production without an OAS!” Perhaps, but the devil is in the details, and those details are often missed. I’ve worked with countless customers who have happily and confidently produced an OAS in which critical details don’t match the reality of the API. Sometimes they’re not complete. Sometimes they’re missing all together. The industry calls these missing details shadow endpoints. Yes, someone did produce an OAS, and security was aware of the API, but a lot of critical detail is missing.
    • Is it being kept up-to-date? Development cycles seem to be moving faster and faster, and as documentation is one of the least glamorous parts of a developer’s job, updates can be missed, dismissed or, at the very least, lag behind. We commonly see multiple versions of an API, and the OAS does not reflect the new capabilities of the latest version.

    While a non-existent or outdated OAS presents a modest concern for API visibility, it creates a substantial concern when trying to serve as the foundation for API security.

    You take a huge risk if you depend solely on OAS for security. More often than not, an OAS is not accurate, lacks critical details and is only as useful as the data you feed into it. Gaps, including shadow APIs, leave out critical details, making enforcement impractical.

    The inaccuracy of OAS leaves customers with two choices. You can either enforce security policies based on strict adherence, and risk blocking legitimate traffic, or you can enforce based on loose adherence and risk letting attacks through. In either scenario, your organization is unduly vulnerable, and significantly less secure than your dev teams intended or your security teams would like.

    OAS is Only a Starting Point

    OAS provides a great starting point for documenting your APIs. Don’t make the mistake, however, of basing your API security strategy on what’s in your OAS. It’s simply not accurate enough. Taking that approach will leave your company’s vital data and services at the mercy of API attackers who will quickly know more about your APIs and what they expose than your OAS does.

  • Document APIs with open source OpenAPI Comment Parser

    By Nicholas Bourdakos, IBM Developer Advocate

    Whether you’re building an application or website, great documentation is crucial to the success of your service. Developers need instructions on how to use your API and they need a way to try it out. Good documentation handles both.

    The OpenAPI Specificationis an open standard for defining and documenting your API. The OpenAPI Specification enables the generation of great documentation, but creating an OpenAPI spec takes a lot of time and effort to create and keep up-to-date. Often, the OpenAPI spec ends up a large, forgotten, thousandl-ine file.

    To help make it as easy as possible to document an API, today we are launching the OpenAPI Comment Parser. The goal of OpenAPI Comment Parser is to give developers a way to generate this OpenAPI spec from comments inline with their code. When the OpenAPI spec lives inside the code, developers are much more likely to keep it up-to-date as their code changes.

    This approach brings the OpenAPI spec to the code. It gets broken up into smaller, more manageable pieces. It lives next to the code that it’s describing. This enables developers to easily update the relevant spec when code changes and don’t have to go searching in the giant spec file. We are also introducing a new spec format that is tailor-made for being written in comments. On average, this new format has been shown to reduce the amount of spec needed to be written by 50 percent.

    The library is built for Node.js, but the CLI can work with any language that uses this style of comments:

    /**
    * comment
    */

    We plan on expanding to most popular languages.

    How can this make a developer’s life easier?

    The Comment Parser automatically creates better documentation with less code that is more manageable. On top of these improvements, developers writing the API can use the documentation generated from the Comment Parser to test their API. This means less time waiting for a frontend to be built or having to rely on other tools in order to test drive their API.

    Try it today

    We built this tool to solve some of the problems we face everyday developing services at IBM. Now, developers can try out the new tool on GitHub.

  • Talend Leads Innovation for OpenAPI Visual Design Support

    Advancements to API Services deliver state-of-the-art compatibility with third-party technologies in the Spring ’19 release of Talend Data Fabric

    Redwood City, CA – April 30, 2019 – Talend (NASDAQ: TLND), a global leader in cloud data integration and data integrity, today announced support for OpenAPI specification (OAS) version 3.0 as part of its Spring ’19 release of Talend Data Fabric. The new API service advancements included with Talend Cloud provide full API development lifecycle support, enabling significant time savings in building and maintaining APIs in an integrated environment. This API foundation serves as a standard and scalable way for companies to make data available to more users inside and outside an organization and to create new products and services that can drive new business models, revenue, and profitability.

    “As a founding member of the OpenAPI Initiative, Talend continues to lead the innovation around visual API design,” said Jerome Louvel, VP of Product Management at Talend. “Given the growth of APIs driven by microservices and digital initiatives, support for an environment that increases DevOps teams’ productivity while enabling collaboration with less technical API stakeholders becomes critically important. With this release, we can also ensure that customers have a smooth upgrade path to OAS 3.0 from previous versions or alternative formats.”

    OAS 3.0 Support Drives Speed and Compatibility

    Talend Cloud is an integration platform-as-a-service (iPaaS) that makes it easy to collect, govern, transform, and share data. Highlights of OAS 3.0 support in Talend Cloud include:

    • Data type composition, e.g. merge different customer information (such as profile, contact and preferences into a unified view of a customer)
    • Data type polymorphism
    • Documentation of new security schemes (such as OpenID Connect or JWT)
    • Reusable API components (e.g. create a component that describes how to paginate results and use it across multiple API operations)
    • Default response and status ranges (e.g. for “any error” on this operation, “this particular” response will be returned)
    • Convert API definitions to and from other formats (e.g RAML and Swagger)
    • Visual implementation of APIs as mini and microservices

    These new features are usable on existing API definitions. Through a quick import, customers can seamlessly transition to OAS 3.0 from Swagger 2 as well as from RAML.

    Additional Cloud Enhancements to Spring ‘19

    In addition to new API services, the Spring ’19 release of Talend Data Fabric includes new features for its management console, data prep and stewardship capabilities, including:

    • Enhanced support for Amazon API Gateway
    • Enhanced support for Azure API Management
    • Automated service deployment through Talend Cloud APIs
    • Authentication via personal access tokens
    • A new web-based graphical designer to create end-to-end pipelines to preview and transform your data
    • Improved efficiency for dataset cleansing and standardization

    For more information on this offering, check out the webinar demo here or sign up for a cloud trial here.

    Like this story? Tweet this:  .@Talend leads innovation for OpenAPI visual design support https://bit.ly/2AVUTIh

    About Talend

    Talend (NASDAQ: TLND), a leader in cloud data integration and data integrity, enables companies to transform by delivering trusted data at the speed of business. Talend Data Fabric offers a single suite of apps that shortens the time to trusted data by solving some of the most complex aspects of the data value chain. Users can collect data across systems, govern it to ensure proper use, transform it to new formats and improve quality, and share it with internal and external stakeholders.

    Over 3,000 global enterprise customers choose Talend to rely on trusted data to make business decisions with confidence. Talend has been recognized as a leader in its field by leading analyst firms and industry publications including Forbes, InfoWorld and SD Times.  For more information, please visit www.talend.com and follow us on Twitter: @Talend.