WSO2 Carbon - custom mediators in common policies - wso2-api-manager

where i can find in Carbon option to upload my own mediators inside common policies, so its possible to choose from these menu bar and its not necessary to upload file into custom policies in publisher ?
Thanks !

Follow the below steps to upload your custom policies as common policies in WSO2 API Manager
Construct your mediation policy and save it with proper naming convention and extension
Navigate to the Carbon Management console of the API Manager server (https://localhost:9443/carbon) and log in with Admin credentials
Expand Resources accordion and click on Browse
Go to /_system/governance/apimgt/customsequences path and choose either in, or out, or fault Resource Collection based on where your mediation policy wants to be listed
Click on Add Resource and upload the content
Method: Upload from content
File: Upload the mediation policy file
Click on Add
Once the above steps are executed successfully, you can log in to the Publisher portal and select the custom mediation policy from the Common Policies section.

Related

Hubspot Custom Workflow Actions are not listing in Workflow tool

I have followed the below steps to create a custom workflow action:
Created a Hubspot developer account and created an App with proper scope, redirect URL and etc.. in it.
I was able to create the action definitions through post man using this App id and H API key.
The definitions were also listed when I use the GET Call
https://api.hubspot.com/automation/v4/actions/121**?hapikey=5af26**-***-***-***-*********
I wanted to use this action in my workflow tool in my test account and sandbox account. So installed it using the install URL in the App section.
Chose the App, accepted permission and received the code also generated the access token with it, during the installation process. (oath process done)
The App was showing up in the "Connected Apps" section in the Integration tab.
So in order to test my App I went to worflowtool but I couldn't find the actions which I custom-defined to appear here.  Can someone help me, what I'm missing here...
Is there some other way I can view the UI of the defined action definition?? Why the custom action is not serachable or not listed in the workflow?
PS: Though the name is Twilio, I'm not integrating it with Twilio, I know there is integration plugins existing already.
Thanks in advance!!
Could be a few possible things that I personally encountered:
published field in your action is set to false. By default the action is created in this way. You need to pass published: true in the creation POST request for it to be enabled on creation. Alternatively you could make a PATCH request and update it after creation.
objectTypes field in your action isn't correct. I has created my action with objectTypes: ['DEALS'] but was checking for the action in a Contact workflow.

How to disable create account feature on wso2 admin portal

I want to disable the create account feature on the WSO2 admin portal.
Come across this solution which says there is a way to hide the button by editing particular frontend view.
Is there any other workaround to disable that button and let only administrators to create user accounts without interfering frontend?
I mean can I get the desired result by editing some configuration files or some components in carbon portal?
If you want to completely disable the self-sign-up feature you can follow [1]. This will disable the feature for the tenant of the user who has logged into the carbon management console and disabled this feature. If you want to restrict this feature to particular users then you can add a self-sign-up workflow and accept/reject the self-sign-up request [2].
[1] https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/customizing-the-developer-portal/enabling-or-disabling-self-signup/#disabling-self-signup
[2] https://apim.docs.wso2.com/en/latest/reference/customize-product/customizations/adding-a-user-signup-workflow/
You can add this to your deployment.toml file, I found it more effective than the official documentation.
[identity_mgt.endpoint]
enable_self_signup_endpoint=false

Dynamic WSO2 API manager store theme change

I need to change WSO2 API manager store theme dynamically based on the inbound request.
For example customer1 should be able to access store with theme specific to customer1.
customer2 should be able to access store with theme specific to customer2.
Is it possible with WSO2 APIM ?
As of now, The API Store theme cannot be changed according to the user who login in. The theme is applied node wise. If you have a clustered/multiple store setup you can have different themese for each API store.
https://docs.wso2.com/display/AM250/Adding+a+New+API+Store+Theme

How to add collaborators to a Firebase app?

On the latest version of Firebase (Announced during Google I/O 2016), how do I add other people to my project or app whom I want to collaborate with? I came across IAM roles through Settings > Permissions. Is this the right way? If I add person there and assign a role, say Editor, will he/she be notified about it through email? Will a request be sent or will they be added directly to that role?
To give people access to your Firebase project, take these steps:
Select your project in the new Firebase Console
In the top left, next to the project name, click the settings/cog wheel icon
Click Users and Permissions
Click Add member
Enter the email address of the user to add and select the appropriate role as per your requirement
Click the second Add member button
The newly added users will get an email with the subject [Firebase] Invitation to join project and an option to Accept Invite in the body. Be certain to let them know that you added them so that they can accept the invite.
UPDATE 6/18/2018 - changes to Cloud Console and Google's functionality, the original solution may no longer work as shared in comments. For a recent project, I was able to add other users and permissions via Firebase console as indicated below.
Old Solution
Originally you had to choose Editor but you do not have to any more. There are new roles added to Google Cloud IAM in the other section, namely the Firebase Rules System role.
If you add a user to a Google Cloud project using IAM and assign them this role, they can access Firebase project by visiting:
https://console.firebase.google.com
The authorized project(s) should appear and they can access, without access to the rest of the Google Cloud project.
In latest version of the console adding is in a bit different.
Go To Your Project -> Project Overview -> Users and Permissions . This will open up new Pop Up.
Now click on the +Add to add the Members.
Now Add Email Id of the member. Now below that choose from the dropdown Project -> Collaborator as shown below and Save. Thats all! You are done.
If you're adding a Project owner, an invite will be sent to the new user. However, no email invites are sent for the Project Editor/Viewer roles.
From Users and Permissions tab, now, at I/O 2019, it was announced a new option to give permissions.
You can now assign to a specific collaborator, access to Analytics, Develop, Quality and Grow, each one with Admin privileges or View privileges.

In wso2 api cloud is it possible to add custom sequence for manipulating request and response to/from back end service

From my understanding of the regular WSO2 API Manager product I could create multiple synapse-configurations and register them as (global or api specific) sequences by placing them in the proper directory.
I would then utilize the Sequence configuration capabilites on the "Manage screen" to apply different sequences to the request and response payloads of the backend.
I read the documentation at https://docs.wso2.com/display/APICloud/Key+Concepts#KeyConcepts-Sequences as it is not possible to add more but I wanted to ask specifically.
Is it at all possible to do this type of manipulation in the current version of public API cloud?
I have talked with the relevant teams and this is how you can add a sequence in the API Cloud. Although I mentioned about adding a sequence via the Gateway's carbon console (and said it was broken), WSO2 API Manager product is not a position to make it working (this is a known limitation). If I explain the reason in simple terms, to support it they will need to ship a lot of mediator UIs which will make the product similar to the WSO2 ESB. Following is what you can do.
Use WSO2 Developer Studio to create the sequence you want.https://docs.wso2.com/display/DVS371/Creating+ESB+Artifacts#CreatingESBArtifacts-Workingwithsequences
Go to API Gateway at https://gateway.api.cloud.wso2.com/carbon
You need to login to the gateway. Username is email#tenantDomain. If your email abc#gmail.com and tenant domain (or the organisation key is xyz) you need to give abc.gmail.com#xyz as the username (note the # in the email being replaced with a DOT). Go to "Manage" in the top level menu of API Cloud and you will be able to figure out your organisation key.
Go to Resources -> Browse menu and navigate to /_system/governance/apimgt/customsequences/ registry path. Upload your sequence to in, out or fault folders based on your requirement. This will be then available when you create APIs via the API Publisher.
Yes, it is possible. You have to follow the below steps.
Go to API Gateway at https://gateway.api.cloud.wso2.com/carbon
You need to login to the gateway. Username is email#tenantDomain. If your email abc#gmail.com and tenant domain (or the organisation key is xyz) you need to give abc.gmail.com#xyz as the username (note the # in the email being replaced with a DOT). Go to "Manage" in the top level menu of API Cloud and you will be able to figure out your organisation key.
After login, you can go to sequence menu and add a sequence. I tried these steps just now and realised there is a broken page at add sequence. We are in the process of fixing it. Will keep you updated.
Difference of API Cloud and API Manager standalone version is, you have to store the sequence in the registry for it to be available at the API Publishing time.
We'll be adding a doc on this at the following location soon.
https://docs.wso2.com/display/APICloud/About+WSO2+API+Cloud#AboutWSO2APICloud-CommonAPICloudusecases

Resources