Kinetic 2022.1 C# BPM SQL Call Stored Proc

The next step is to make sure we secure these APIs through some type of authentication (token over basic preferred) and authorization once identified.

Security Level Up:
Add an endpoint to your API like “admin” that is never called by any of your in-house programs, but when it is called, it gathers as much information about the caller so you can see who’s snooping around your network.

:honey_pot:

2 Likes

Also wrap the whole thing in a IP rate limiter that triggers based on 401 responses so that if someone tries to brute force they get put in time out. Exponential one too

4 Likes

Nice!

Y’all take all the fun out of “playing” and learning :slight_smile:

2 Likes

image

1 Like

But learning security IS fun!!! :lying_face:

Just from Monday:
Why the future of APIs must include zero trust | VentureBeat

2 Likes

Looks like in 2022.2 you can no longer use System.Data.SqlClient

1 Like

what about Microsoft.Data.SQLClient?

I’ve got that working in 2022.1

That’s what I ended up using, forgot to post back here. Have to add it to externals unfortunately

during the long winter evenings, said Pa, I’m going get out that eFX from the woodshed and carve myself a generic CRUD function to use instead

2 Likes

Got around to trying this, doesn’t work either. Get this error

Microsoft.Data.SqlClient is not supported on this platform

whoa… you have all the dotnet stuff correct for the version? There’s a list of things we had to upgrade. We also went to Windows Server 2019. Is that the same?

Tried different version of Microsoft.Data.SqlClient still that error

Got it to work, moved the sql bit out of the bpm into a function passing the function a string for cmdText. Added an assembly for System.Data.SqClient and it worked… why BPMs no longer work I have no idea

because epicor…

1 Like

OK Bill…

Nice, some light reading for the holidays! :heart:

1 Like

Lok

Thanks,
Tanner Post

1 Like

We are on 2022.1.27 I’m trying the same thing in a function.
I add the Assembly to the library , looks like it’s the correct version.

Still get that same error you did, when trying to create a SqlConnection object in the function code editor.

can you share how you got that to work?

This might be helpful.

1 Like

Thank you bmanners

Bill Jackson | Sr ERP Application Developer
O: 401-227-5557
1160 Cranston St | Cranston, RI 02920 | TacoComfort.com

View our current career opportunities

1 Like