WSO2 API Manager Sequences are getting overidded with initial version - wso2-api-manager

I had created Message Mediation policy on an API published in WSO2 API Manager 1.10.0. Due to new requirements, I modified the policy in the /synapse/default/sequences/API-Name.xml .It works as expected but it gets reverted to the initial version when wso2am is restarted.
I am facing issue using the WSO2 Plugin with eclipse and hence updating the sequence in this manner. Is this the right way to update or Is there any other change i am missing?

It seems like the file is getting replaced with the value in the registry. This looks like a bug.
As a workaround, you can edit sequence saved in the registry.
Navigate to carbon console.
Home->Resources->Browse.
Go to path /_system/governance/apimgt/customsequences/in/
Edit as xml.
Save and restart.

Related

Problem deploying project on Firebase with Stripe

I'm trying to deploy my app that has the stripe payment extension installed. Everything works fine on the emulator (I am not using stripe for the moment) but when I try to deploy everything looks ok except deploy fails with this message:
Error: firestore-stripe-payments: Found
'projects/1234/secrets/ext-firestore-stripe-payments-STRIPE_API_KEY/versions/1'
for secret param STRIPE_API_KEY, but this instance was previously
using a different secret
projects/1234/secrets/firestore-stripe-payments-STRIPE_API_KEY.
Changing secrets is not supported. If you want to change the value of
this secret, use a new version of
projects/1234/secrets/firestore-stripe-payments-STRIPE_API_KEY.You
can create a new version at
https://console.cloud.google.com/security/secret-manager?project=1234
So I go to the link without knowing how my emulator API key works compared to the production one ( I didn't activated the Stripe account ). Here I find two keys, one is firestore-stripe-payments-STRIPE_API_KEY and the other one is ext-firestore-stripe-payments-STRIPE_API_KEY. When I click to make a new version it asks for a file with a secret.
So my main problem is: do I need to change version of both two secrets or only one? Second problem is where do I find those keys and does the test API key work on deployment?
Am I missing something here, am I on the right path?

Error while Creating a Relying Party Trust in ADFS

We are getting attached error while adding a relying party trust to ADFS. This needed to be done as our CRM Test server had to be repaired since it was not taking in new patches. We reinstalled CRM and were trying to reconfigure IFD when we are running into this issue
Error While Adding a Relying Party
While on the ADFS server, can you browse to the metadata address?
Does it result in an XML document?
I've seen this error when you have HTTP URL in the metadata. In which case, download the metadata, change to HTTPS and load as a file.
Failing that, can you add the RP manually?
We performed all the steps again and this time the File option worked for us. we were able to move forward by downloading the XML and use it.

Azure Devops publishing to own feed suddenly results in 403 forbidden

I have been using Azure DevOps for a project for quite some time, but suddenly publishing to my own organisation/collection feed results in a 403.
I created a feed and I can select it on the nuget push build step, but it does not work. I created a new feed to publish the NuGet packages to and this works perfectly again. It seems to me like a token expired, but I never created one or used it to authenticate. I also do not want to change my NuGet feed to the new one, as I want to use older packages as well.
This is the buildpipeline:
And this is the stack trace:
Active code page: 65001 SYSTEMVSSCONNECTION exists true
SYSTEMVSSCONNECTION exists true SYSTEMVSSCONNECTION exists true
[warning]Could not create provenance session: {"statusCode":500,"result":{"$id":"1","innerException":null,"message":"User
'a831bb9f-aef5-4b63-91cd-4027b16710cf' lacks permission to complete
this action. You need to have
'ReadPackages'.","typeName":"Microsoft.VisualStudio.Services.Feed.WebApi.FeedNeedsPermissionsException,
Microsoft.VisualStudio.Services.Feed.WebApi","typeKey":"FeedNeedsPermissionsException","errorCode":0,"eventId":3000}}
Saving NuGet.config to a temporary config file. Saving NuGet.config to
a temporary config file. [command]"C:\Program Files\dotnet\dotnet.exe"
nuget push d:\a\1\a\Microwave.0.13.3.2019072215-beta.nupkg --source
https://simonheiss87.pkgs.visualstudio.com/_packaging/5f0802e1-99c5-450f-b02d-6d5f1c946cff/nuget/v3/index.json
--api-key VSTS error: Unable to load the service index for source https://simonheiss87.pkgs.visualstudio.com/_packaging/5f0802e1-99c5-450f-b02d-6d5f1c946cff/nuget/v3/index.json.
error: Response status code does not indicate success: 403
(Forbidden - User 'a831bb9f-aef5-4b63-91cd-4027b16710cf' lacks
permission to complete this action. You need to have 'ReadPackages'.
(DevOps Activity ID: 2D81C262-96A3-457B-B792-0B73514AAB5E)).
[error]Error: The process 'C:\Program Files\dotnet\dotnet.exe' failed with exit code 1
[error]Packages failed to publish
[section]Finishing: dotnet push to own feed
Is there an option I am overlooking where I have to authenticate myself somehow? It is just so weird.
"message":"User 'a831bb9f-aef5-4b63-91cd-4027b16710cf' lacks
permission to complete this action. You need to have 'ReadPackages'.
According to this error message, the error you received caused by the user(a831bb9f-aef5-4b63-91cd-4027b16710cf) does not have the access permission to your feed.
And also, as I checked from backend, a831bb9f-aef5-4b63-91cd-4027b16710cf is the VSID of your Build Service account. So, please try with adding this user(Micxxxave Build Service (sixxxxss87)) into your target feed, and assign this user the role of Contributor or higher permissions on the feed.
In addition, here has the doc you can refer:
There is a new UI in the Feed Permissions:
To further expand on Merlin's solution & related links (specifically this one about scope), if your solution has only ONE project within it, Azure Pipelines seems to automatically restrict the scope of the job agent to the agent itself. As a result, it has no visibility of any services outside of it, including your own private NuGet repos held in Pipelines.
Solutions with multiple projects automatically have their scope unlocked, giving build agents visibility of your private NuGet feeds held in Pipelines.
I've found the easiest way to remove the scope restrictions on single project builds is to:
In the pipelines project, click the "Settings" cog at the bottom left of the screen.
Go to Pipelines > Settings
Uncheck "Limit job authorization scope to current project"
Hey presto, your 403 error during your builds involving private NuGet feeds should now disappear!
I want to add a bit more information just in case somebody ends up having the same kind of problem. All information shared by the other users is correct, there is one more caveat to keep into consideration.
The policies settings are superseded by the organization settings. If you find yourself unable to modify the settings or they are grayed out click on "Azure DevOps" logo at the left top of the screen.
Click on Organization Settings at the bottom left.
Go to Pipeline --> Settings and verify the current configuration.
When I created my organization it was limiting the scope at the organization level. It took me a while to realize it was superseding the project.
Still wondering where that "Limit job authorization scope to current project" setting is, took me a while to find it, its in the project settings, below screenshot should help
It may not be immediately obvious or intuitive, but this error will also occur when the project your pipeline is running under is public, but the feed it is accessing is not. That might be the case, for instance, when accessing an organization-level feed.
In that scenario, there are three possible resolutions:
Make the feed public, in which case authentication isn't required; or
Make the project private, thus forcing the service to authenticate; or
Include the Allow project-scoped builds under your feed permissions.
The instructions for the last option are included in #Merlin Liang - MSFT's excellent answer, but the other options might be preferable depending on your requirements.
At minimum, this hopefully provides additional insight into the types of circumstances that can lead to this error.
Another thing to check, if using a yaml file for the Pipelines, is if the feed name is correct.
I know this might seem like a moot point, but I spent a long time debugging the ..lacks permission to complete this action. You need to have 'AddPackage'. error only to find I had referenced the wrong feed in my azure-pipelines.yaml file.
If you don't want to/cannot change Project-level settings like here
You can set this per feed by clicking 'Allow Project-scoped builds' (for me greyed out as it's already enabled).
That's different from the accepted answer, as you don't have to explicitly add the user and set the permissions.
Adding these two permissions solved my issue.
Project Collection Build Service (PROJECT_NAME)
[PROJECT_NAME]\Project Collection Build Service Accounts
https://learn.microsoft.com/en-us/answers/questions/723164/granting-read-privileges-to-azure-artifact-feed.html
If I clone an existing pipeline that works and modify it for a new project the build works fine.
But if I try to create a new pipeline I get the 403 forbidden error.
This may not be a solution but I have tried everything else suggest here and elsewhere but I still cannot get it to work.
Cloning worked for me.

How to use Rest Api in kaa with version 0.10.0 with document in ver 0.9

i try to use rest api in kaa ver 0.10.0 but document is empty https://kaaproject.github.io/kaa/docs/v0.10.0/Programming-guide/Server-REST-APIs/
I use document in ver 0.9 but something not work.How i can reference rest api with kaa ver 0.10.0
Please share the error msg that you are getting. Mostly it's a case of incorrect appender config or field name mismatch with those mentioned in your DB. I was facing following errors with REST log appender but was able to solve them as mentioned below:
Error 500: I found two errors with my configuration of RestLogAppender in the admin panel. First, I had put http:// before my host. Had to remove the same. Second, I should have mentioned Relative URI path starting and ending with a forward slash /.
Error 400: I had given slightly different names to the JSON fields in the Django models. The sequence of the fields did not matter but the name of fields did matter.
I used this API http://docs.kaaproject.org/display/KAA/Admin+REST+API#AdminRESTAPI-Getuserprofile and was successfully able to use it. Please specify the specific problem you are facing?
Edit: and dont forget to check the api using PostMan if you find any issue.
The Kaa 0.10.0 documentation server REST API uses JS scripts that are hosted on third-party servers. Unfortunately, those servers are now down and that is why the REST API documentation page is rendered empty at the moment.
Kaa team has already prepared a fix for this. The respective JS files will be hosted along with the documentation. But, this requires some additional work to be done before the updated documentation become available.

How to use 51Degrees via NuGet with Azure?

I'm tryign to use 51Degrees in a .NET project that I deploy to Azure. August 2011, they released v1.2.1.3 marked as "Azure Compatible":
Foundation can now be deployed on to the Windows Azure Cloud service.
See the release note for full details on requirements and how to
setup. Azure related changes include: Instead of a log file, log
entries are written to a log table Instead of a devices file, previous
device requests are written to a device table A new conditional
compilation symbol - 'AZURE'. AZURE enabled builds will not work in
traditional ASP.NET.
Since then there have been a dozen releases and they are up to v2.1.4.9. However, their documentaiton is super light on how to use it with Azure. In fact, there was a bug originally because v1.2.1.3 stated
To make use of the changes you must create a storage account called
‘fiftyonedegrees’. The foundation will then create two tables, one for
previous devices, and another for logs.
This isn't possible because Azure storage accounts need to be unique across all instances so everyone can't create ones named fifityonedegrees.
Their response was:
After rereading the blog it seems I've made an oversight in this
regard, and will update shortly.
The storage account that the Foundation looks for can be changed in
the Foundation source code. Go to Foundation/Properties/Constants.cs
and change the string 'AZURE_STORAGE_NAME' to the name of your storage
account.
However, I'm still at a loss at how to utilize it within my project. Here's my issues:
I'm not clear whether v1.2.1.3 is the only Azure compatible release, or every release after is Azure compatible. Their documentation doesn't say.
When I install 51Degrees via NuGet, my project doesn't get an App_Data folder created which contradicts their documentation. The web.config file even has entries in it that reference the App_Data folder such as <log logFile="~/App_Data/Log.txt" logLevel="Info"/>.
Based on the response to the Azure storage account bug I quoted earlier, they are sayign IN need to edit the file Foundation/Properties/Constants.cs. However, since I'm installing via NuGet and it's a DLL, NuGet is presumably the wrong approach? Do I need to download the source and compile it myself and wire it up to my project manually?
I'm generally new to .NET, NuGet, VS, etc so appreciate the help.
All versions are Azure compatible from 1.2.1.3 onwards. I'm assuming this is the blog post you were talking about. After you've created your azure storage account, you'll have to edit the Constants.cs file in the source code and add in your account name. It's my understanding that this means you'll have to get access to the source code and edit it directly. One you have done this you'll need to recompile for the software to work correctly. I'm not sure if there is a way to perform the same task using NuGet, but I'll look into it. Hope this helps.

Resources