Create CustomDBMSAutheticator using WLST - weblogic

I like to create new customdbmsauthenticator authentication provider to weblogic security realm using wlst python script. For default authenticator it is like
cmo.createAuthenticationProvider("MyProvider","weblogic.security.providers.authentication.DefaultAuthenticator")
but which class is for customdbmsauthenticator instead of weblogic.security.providers.authentication.DefaultAuthenticator?

The class you are looking for is weblogic.security.providers.authentication.CustomDBMSAuthenticator

Related

Bypass setup wizard in fusion auth to create application

I am using Fusion Auth as an auth backend for my project.
After starting up the container as shown here(https://fusionauth.io/docs/v1/tech/installation-guide/docker), if we open the URL(Ex: http://localhost:9011) we need to create an admin user and then we will be able to create Application, API Key, Lambda.
As my project doesn't involve UI interaction, I wanted to create Application without involving UI interaction(i.e., setup-wizard).
I was unable to find an API that relates to setup-wizard.
As I saw Since this is your own private instance of FusionAuth, you need to create a new administrator account that you will use to log in to the FusionAuth web interface. in setup-wizard I thought this is required only for UI, So I tried to create Application using this(https://fusionauth.io/docs/v1/tech/apis/applications#create-an-application) API, but it is returning a 401(Unauthorized).
Can someone help me to either create an application without authentication or bypass setup-wizard?
The FusionAuth Kickstart does exactly what you need. It will allow you to pre-define the configuration that you require in a JSON file and then the system will bootstrap itself automatically.
The base use case it to provision an API key which would allow you to programmatically configure the rest of the system by using APIs after an API key has been created.
{
"apiKeys": [{
"key": "a super secret API key that nobody knows"
}]
}
You also have the option of building your entire configuration in the Kickstart definition. There are a bunch of examples and walk throughs on the Kickstart installation guide.
Good luck!

Symfony 3.1: configuration of ldap component as service

I'm writing my first Symfony app and and I need authenticate users over LDAP/AD, but I run out of documentation...
I found many solutions for use LdapClient, but it tagged as deprecated. So, i check for use the new one Ldap class as recommended, but I not found documentation for use it. The documentation of Ldap component for the current version (3.1) suggest to use LdapClient yet! It isn't updated yet?
I don't know how to do: must we create an adapter for add a Ldap service? If so, how to proceed?
Any help will be appreciated, thanks!
Check out this cookbook article for configuring LDAP authentication using the builtin Symfony component:
http://symfony.com/doc/current/cookbook/security/ldap.html
I also have a bundle I maintain that includes LDAP authentication that works well with AD called LdapToolsBundle. It has documentation on the main page for the app/config/config.yml entries needed to configure your domain for use in the bundle, and also some details on configuring authentication in app/config/security.yml here.
The bundle above provides a LDAP service called ldap_tools.ldap_manager that can be used to query/create/modify different types AD objects.
take a look at my Blog:
https://alvinbunk.wordpress.com/2016/03/25/symfony-ad-integration/
This requires FOSUserBundle and FR3DLdapBundle, but I think if you go through all that documentation you should be able to get LDAP/AD integration with Symfony3 working.
EDIT #2
Below is a second easier solution:
https://alvinbunk.wordpress.com/2017/09/07/symfony-ldap-component-ad-authentication/

How to create user in Openfire from java?

I want to create user and register that user to roster from my java application manually to openfire server .
Is there any way or any example?
You can use the REST API from Openfire for that.
How to create a new user: http://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html#create-a-user
How to add a roster entry: http://www.igniterealtime.org/projects/openfire/plugins/restapi/readme.html#create-a-user-roster-entry
You can download REST API Plugin here: http://www.igniterealtime.org/projects/openfire/plugins.jsp
Official JAVA implementation: https://github.com/igniterealtime/REST-API-Client

Liferay: Verify if exist screenName on LDAP

I need to call LDAP to see if the user exists.
The registration of the account will be enabled only for screenName that are present on LDAP.
I have configured LDAP correctly on Liferay but I do not have to enable importing from LDAP.
Which class and method should I use just to check if the screenName exists on LDAP?
Thank you for your help
you can do this replacing default Screen Name Validator, overwriting the next property at portal-ext.properties
users.screen.name.validator=com.liferay.portal.security.auth.DefaultScreenNameValidator
Put your [package].[class] here. Please, check the following link, can guide you:
https://github.com/liferay/liferay-portal/blob/master/portal-service/src/com/liferay/portal/security/auth/DefaultScreenNameValidator.java
At the end, you only need to implement the ScreenNameValidator interface
Cheers!

Command Line Authentication in Web2py

I have made a web interface for my project using web2py and configured login with pam. Now i have to make a CLI for the same. I could not find any way i can authenticate the user (we can assume that the user i want to authenticate is already logged in on the linux machine configured with pam and running web2py).
First you need to find out the name of the logged in user:
username = os.getlogin()
Then you force a login:
from gluon.storage import Storage
from uuid import uuid4
session.auth = Storage(user=user, last_visit=request.now,
expiration=auth.settings.expiration,
hmac_key = str(uuid4())
we are about to add a auth method to do this in one line.
To add to what Massimo said, this one-line login has been implemented now. You can do so using the following code:
#User_id is whatever the id is for the user you are forcing them to log in to
auth.login_user(user_id)
I couldn't find any documentation on this in the book but you can take a look at the method yourself in the gluon.tools module in the source.