How to create GUID in vugen in java-user protocol (Load runner)? - performance-testing

I need GUID to pass in message, for that need to Create GUID in java user protocol.
I tried and I can create GUID in web protocol but unable to find something in java protocol

Related

NodeJS object DNS API service prototype

I'd like to write a basic DNS API service using NodeJS; I have an external (black-boxed) service that both generates random URL(s) as access points: https://<host_name>/<UUID> and pushes these URL(s) to my service.
I would like a way to link these URL(s) with static names that a user can create (upon registration). The idea is that users would be able to generate a static keys (unique identifiers) and use these "keys" (unique-identifiers) to access (by redirection) a given URL; for example, suppose that the temporary link ( one of the ones that is being pushed into my DNS service) looks like this: http://cool_server/2938ba6e-e54e-4393-926f-dacc91c2a33e (the UUID keeps changing every x number of minutes), the user creates an account on my object_DNS_service and generates a static key (or string that is unique): link_to_cool_server.
I would like my DNS service to link http://cool_server/2938ba6e-e54e-4393-926f-dacc91c2a33e to http(s)://link_to_cool_server.<my_host_name>such that no matter how often that URL that is being pushed into my service changes, a user would be able to still access it by redirection, using my own host-name and their unique key/string:
My question is: would the DNS module in NodeJS be able to help me solve this problem? - how should I go about this?
Use wildcard dns on <my_host_name> such that <anything>.<my_host_name> resolves to the ip address of your node server
There will be a single endpoint/route on that node server which pulls the <key> out of the url https://<key>.<my_host_name>
The endpoint then looks up the current UUID for <key> in your database
Responds to the request with a redirect to https://cool_server/<UUID>

Kentico 9 REST service 403 error

I have a custom page type (kff.SeasonCTA), that I'm trying to access. The goal is the present the data from the custom pages on a static HTML page using jQuery. I've confirmed the REST service is working as i can get the county json object as per the documentation.
I've set authentication to Basic, and the service enabled as Both. I generated a hash with this URL: http://dev.knowledgefirstfinancial.ca/rest/kff.SeasonalCTA?format=json
I get a 403. I read more, and i think it's because i'm doing an ALL. So how can i specify only published pages.
Or is it possible to get all the child data from a cms.folder if i specify the folder by it's GUID?
I'd recommend using basic authentication: create user account and make sure it has all necessary permissions (use impersonation to verify access) and pass that user in authorization header.
It is possible to request all the child by node alias path:
/content/currentsite/<culture>/childrenof/<alias path>
/content/currentsite/en-us/childrenof/news

MVC5 Use default Authorize attribute with roles using Windows Authentication and Custom UserStore

The system
I have and MVC5 web application using windows authentication.
There is an old database where I already have users, groups and roles.
Aim
Use the standard [Authorize(Roles = "myExistingRole")] without creating a custom attribute, reusing the existing roles and users in the DB.
Current state
I use EF6, .net 4.5.1.
I'm able to use the [Authorize] attribute. (OK)
I'm able to login and User.Identity is properly populated. (OK)
I properly extended IUser, IUserStore, IRole, IRoleStore and so on. (OK)
I can successfully use the UserManager to get all the data I need. (OK)
I can user the UserManager to verify if a user is in role. (OK)
User.IsInRole("myExistingRole") return false, but should return true. (BAD)
The problem
The [Authorize(Roles = "myExistingRole")] never authorize me.
User.IsInRole("myExistingRole") always reply false.
My point
I don't know what I should do to instruct the system to use my implementation.
The only option I know I have is to create a custom attribute and register it as filter, but I'd prefer to use the standard one and maybe extend it in the future using Claims.
Can you help me understanding what I'm doing wrong?

Customizing ASP.NET Identity, OWIN and Social provider logins

I am new to ASP.NET MVC 5 and OWIN.
I have upgraded my project to MVC 5 to implement the authentication and authorization of my project. Problem is that my project does not store the user data. When user logins in I ask a different system via a WCF service to tell me if the user is authenticated. So I do not have a database nor tables that the user is stored in.
But I want to add the ability to login via social providers using OWIN. For this I will add a local database table to store the social provider Id/Token
Looking around other have asked similar question but only when they want to change database type store... Whilst I actually don't store the data... Is it still possible to customize this with ASP.NET Identity and how would I do this?
I would recommend creating a custom IUserStore that connects to the wcf service.
http://www.asp.net/identity/overview/extensibility/overview-of-custom-storage-providers-for-aspnet-identity
If you don't want to implement your own IUserStore, you can still use the built in default EF based UserStore and just only use the external login apis. The database schema will have a bunch of columns that will always be null like PasswordHash etc, but the operations you care about would still work fine:
CreateAsync(TUser) - Create a user
AddLoginAsync(userId, UserLoginInfo) - Associate an external login
FindAsync(UserLoginInfo) - Return the user with the associated external login
I looked into the solutions suggested. I found that the method names of the interfaces to implement did not really fit and there where way too many methods as well.
I ended up only using the OWIN Context in AccountController to extract the LoginInfo with all the details I wanted. This way I did not have to implement any custom versions of IUserLoginStore etc...
I wanted the simplest solution to implement and therefore I ended up with:
1. Added StartupAuth class from template mvc project and configured different providers there
1. In AccountController: Extracted the claims from LoginInfo,
2. Stored OpenId in a table for lookup and then continued on as before.
You have to provide a UserStore and pass it to the UserManager, if you are already using entityframework in the default mvc5 project, you can write your CustomUserStore which inherits from Microsoft.AspNet.Identity.EntityFramework.UserStore and override the methods defined in Microsoft.AspNet.Identity.EntityFramework.IUserLoginStore:
public interface IUserLoginStore<TUser, in TKey> : IUserStore<TUser, TKey>, IDisposable where TUser : class, Microsoft.AspNet.Identity.IUser<TKey>
{
Task AddLoginAsync(TUser user, UserLoginInfo login);
Task<TUser> FindAsync(UserLoginInfo login);
Task<Collections.Generic.IList<UserLoginInfo>> GetLoginsAsync(TUser user);
Task RemoveLoginAsync(TUser user, UserLoginInfo login);
}
if you don't use entityframework, you have to provide your own way of accessing your database,by writing a UserStore which implements IUserStore, IUserLoginStore, IUserClaimStore, IUserRoleStore,IUserPasswordStore,IUserSecurityStampStore (depends on your need but at least IUserStore and IUserLoginStore as IUserStore is mandatory and IUserLoginStore is what you want to add)
all these interfaces are in Microsoft.AspNet.Identity namespace.
here how to implement a Custom MySQL ASP.NET Identity Storage Provider and
here how to use Dapper ORM instead of EntityFramwework.

how to get application name for a google doc?

I am trying to talk the google docs. I need the appcation name string. I have no idea what it is. please help
This name is arbitrary. It is meant to identify your program with Google. Here's what Google says about the application name:
applicationName - the name of the client application accessing the service. Application names should preferably have the format [company-id]-[app-name]-[app-version]. The name will be used by the Google servers to monitor the source of authentication.
protocol - name of protocol to use for authentication ("http"/"https")
domainName - the name of the domain hosting the login handler

Resources