Ausnahme gefangen: SSL certificate problem: certificate is not yet valid ๐Ÿ“Œ Migrating OData V3 Services to OData V4 without Disrupting Existing Clients

๐Ÿ  Team IT Security News

TSecurity.de ist eine Online-Plattform, die sich auf die Bereitstellung von Informationen,alle 15 Minuten neuste Nachrichten, Bildungsressourcen und Dienstleistungen rund um das Thema IT-Sicherheit spezialisiert hat.
Ob es sich um aktuelle Nachrichten, Fachartikel, Blogbeitrรคge, Webinare, Tutorials, oder Tipps & Tricks handelt, TSecurity.de bietet seinen Nutzern einen umfassenden รœberblick รผber die wichtigsten Aspekte der IT-Sicherheit in einer sich stรคndig verรคndernden digitalen Welt.

16.12.2023 - TIP: Wer den Cookie Consent Banner akzeptiert, kann z.B. von Englisch nach Deutsch รผbersetzen, erst Englisch auswรคhlen dann wieder Deutsch!

Google Android Playstore Download Button fรผr Team IT Security



๐Ÿ“š Migrating OData V3 Services to OData V4 without Disrupting Existing Clients


๐Ÿ’ก Newskategorie: Programmierung
๐Ÿ”— Quelle: devblogs.microsoft.com

The migration from your existing OData V3 services to V4 can be challenging if there are some clients that cannot be easily upgraded, like the ones running on on-premises resources. The OData V3 services will need to be kept running until the old clients have been phased out, incurring maintenance overhead. OData team recently released an extension to overcome the challenge. This extension eases the transitioning by enabling OData V4 services to serve OData V3 requests. The advantage is that no changes are needed on the OData V3 clients while the OData V3 services are migrated to OData V4.

In this article, I am going to show you how to use the Migration extension.

Prerequisites

It is assumed that you have migrated your OData V3 service to OData V4 and:

  • The service is built on ASP.NET Core 2.1+
  • The models remain unchanged including naming and name space
  • The requests and responses use JSON format

If a request is sent from the OData V3 client to the V4 service, the response will most likely be a 404 NotFound error because the service does not know how to route the request to the controller.

Adding Package Reference

Add a reference to the latest Microsoft.OData.Extensions.Migration package.

Image Migration reference

Configuring OData Migration Services

Add the OData Migration extension to services. It needs to be added after OData.

public static void ConfigureServices(IServiceCollection services)
{
    // your code here

    // AddOData must be called before AddODataMigration
    services.AddOData();
    services.AddODataMigration();

    // your code here
}

Using OData Migration Middleware

Call UseODataMigration to enable the extension in the pipeline. It needs both the OData V3 and V4 models. The OData V3 model can be represented by either a Data.Edm.IEdmModel object or an EDMX string. The service will return the OData V3 formatted EDMX for the metadata calls.

Below is the sample code of calling UseODataMigration with an OData V3 EDMX string.

public static void Configure(IApplicationBuilder builder)
{
    // your code here

    // If using batching, you must call UseODataBatching before UseODataMigration
    builder.UseODataBatching();

    string v3Edmx = /*your EDMX string*/
    builder.UseODataMigration(v3Edmx, v4model);

    // your code here
}

Features

Now if you make a metadata call to the service:

https://localhost/ODataV4Service/$metadata

The response should be the EDMX text for the OData V3 model:

<?xml version="1.0" encoding="iso-8859-1"?>
<edmx:Edmx xmlns:edmx="http://schemas.microsoft.com/ado/2009/11/edmx" Version="3.0">
  <edmx:DataServices xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata" m:MaxDataServiceVersion="3.0" m:DataServiceVersion="3.0">
    <Schema xmlns="http://schemas.microsoft.com/ado/2009/11/edm" Namespace="Your.Namespace">
      <EntityContainer m:IsDefaultEntityContainer="true" Name="CommonContainer">
        <!-- Your entities here -->
      ...

The OData V4 service can respond to both OData V3 and V4 clients now.

URI Migration

Under the hood, the OData V3 URI is translated to the OData V4 format.

For example, a GUID value has different representation in OData V3 and V4. The following OData V3 URI:

https://localhost/v3/Product(guidโ€™02951787-4c1a-4dff-a917-a04b21b40ad3โ€˜)

will be translated into:

https://localhost/v4/Product(02951787-4c1a-4dff-a917-a04b21b40ad3)

Request/Response Payload Migration

The extension is also able to deserialize an OData V3 request body and serialize the response body to the OData V3 format.

For example, a long value is serialized differently in OData V3 and V4. The client will send and receive a payload like

{
  "MyString": โ€œJohnโ€
  "MyLong": "1000000000"
}

while the OData V4 service sees below internally:

{
  "MyString": "John",
  "MyLong": 1000000000
}

Once the OData V3 clients have been phased out simply remove the reference and the two lines of code for OData Migration.

Final Notes

More information on the OData Migration extension including architecture and limitations can be found here. The source code of the extension is published on GitHub.

If you have any questions, comments, concerns or if you are running into any issues using this extension feel free to reach out on this blog post or by email. We are more than happy to listen to your feedback and communicate your concerns.

The post Migrating OData V3 Services to OData V4 without Disrupting Existing Clients appeared first on OData.

...



๐Ÿ“Œ Migrating OData V3 Services to OData V4 without Disrupting Existing Clients


๐Ÿ“ˆ 116.2 Punkte

๐Ÿ“Œ Using SkipToken for Paging in Asp.Net OData and Asp.Net Core OData


๐Ÿ“ˆ 38.48 Punkte

๐Ÿ“Œ Migrating to SQL: Discover and Assess SQL Server Data Estate Migrating to Azure SQL (Ep. 2)


๐Ÿ“ˆ 32.29 Punkte

๐Ÿ“Œ Migrating to SQL: Discover and Assess SQL Server Data Estate Migrating to Azure SQL (Ep.2) | Data Exposed


๐Ÿ“ˆ 32.29 Punkte

๐Ÿ“Œ Migrating FileNet Into AWS Cloud and Migrating FileNet Security Into AWS Cloud


๐Ÿ“ˆ 32.29 Punkte

๐Ÿ“Œ The App Approval Workflow Keeps Enterprise Security in Check Without Disrupting Productivity


๐Ÿ“ˆ 28.04 Punkte

๐Ÿ“Œ Blackpoint Cyber launches Blackpoint RISK, a cyber liability insurance solution for existing and new clients


๐Ÿ“ˆ 27.36 Punkte

๐Ÿ“Œ UN Maritime Agency Suffered Cyber Attack Disrupting Its Web-Based Services


๐Ÿ“ˆ 26.12 Punkte

๐Ÿ“Œ Super Bock says 'cyber' nasty 'disrupting computer services'


๐Ÿ“ˆ 26.12 Punkte

๐Ÿ“Œ Disrupting the gateway services to cybercrime


๐Ÿ“ˆ 26.12 Punkte

๐Ÿ“Œ The ransomware attack on Westpole is disrupting digital services for Italian public administration


๐Ÿ“ˆ 26.12 Punkte

๐Ÿ“Œ Are Amazon Packages Disrupting Mail Services in Some Small Towns?


๐Ÿ“ˆ 26.12 Punkte

๐Ÿ“Œ How does Windows manage to build new APIs without breaking existing ones?


๐Ÿ“ˆ 23.35 Punkte

๐Ÿ“Œ How does Windows Runtime manage to build new APIs without breaking existing ones?


๐Ÿ“ˆ 23.35 Punkte

๐Ÿ“Œ How does Azure manage to build new APIs without breaking existing ones?


๐Ÿ“ˆ 23.35 Punkte

๐Ÿ“Œ LinkedIn Now Lets You Look For New Job Without Your Existing Boss Finding Out


๐Ÿ“ˆ 23.35 Punkte

๐Ÿ“Œ LinkedIn Now Lets You Look For New Job Without Your Existing Boss Finding Out


๐Ÿ“ˆ 23.35 Punkte

๐Ÿ“Œ Cloud services: What to consider when migrating your infrastructure


๐Ÿ“ˆ 22.32 Punkte

๐Ÿ“Œ Google Play services and Firebase migrating to AndroidX


๐Ÿ“ˆ 22.32 Punkte

๐Ÿ“Œ 51 Percent of Financial Services Companies Believe Existing Tech is Holding Them Back


๐Ÿ“ˆ 21.43 Punkte

๐Ÿ“Œ What Ban? Huawei is Launching 'New Editions' of Existing Smartphones With Support For Google Services


๐Ÿ“ˆ 21.43 Punkte

๐Ÿ“Œ 11:11 Systems acquires Static1 to strengthen its existing managed services


๐Ÿ“ˆ 21.43 Punkte

๐Ÿ“Œ Pmkidcracker - A Tool To Crack WPA2 Passphrase With PMKID Value Without Clients Or De-Authentication


๐Ÿ“ˆ 20.21 Punkte

๐Ÿ“Œ How Alternative DBs are Disrupting the Conventionals in 2018


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ WebAssembly: Disrupting JavaScript


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ Security Culture Hacking: Disrupting the Security Status Quo - Chris Romeo - AppSecUSA 2018


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ 2 students arrested for disrupting school WiFi to skip exam


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ How AI is disrupting the Web Hosting industry


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ How AI is disrupting the Web Hosting industry


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ AT&T bails on RSA: How the coronavirus is disrupting tech conferences worldwide


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ Verizon bails on RSA: How the coronavirus is disrupting tech conferences worldwide


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ Facebook cancels F8: How the coronavirus is disrupting tech conferences worldwide


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ Huawei ban: Full timeline as it warns against disrupting its role in Britain's 5G rollout


๐Ÿ“ˆ 19.94 Punkte

๐Ÿ“Œ Disrupting Traditional Security Research & Advisory - Edward Amoroso - BSW #185


๐Ÿ“ˆ 19.94 Punkte











matomo