Wher is stored admin username and password inside WSO2 Prodcuts? - configuration

I had face strange behavior for ${admin.username} and ${admin.password} inside APIM nodes. I need to know where this information are stored.
People tell me that is an appointment for user-mgt.xml inside <AdminUser> <UserName> and <Password> tags. Other said that is stored inside registry.
Anyone knows exactly where this information is stored?
Regards ,
Marcello.

If you're asking about the configuration, the answer is user-mgt.xml file.
Or if you're asking about where the user credentials are store, the answer is they are stored in UM_USER table in UM_DB (or SHARED_DB in 3.x versions) if you're using the default JDBC userstore.

Related

Flask SQLAlchemy login with postgresql

So I have already created a database using the pgadmin3 in postgresql. I have a set of email-ids and passwords. The passwords which I have stored are hashed, i.e. by using pwd_context.hash(password) from the pass.libs.
I have stored them as shown below in the database. Now I have to create another login form in html to authenticate. I am new to flask, but I have seen something called as flask-login. How to compare the password entered in cleartext with the hashed password in database.
Flask-login provides a set of functions... for user login,logout and so on. More information on Flask-login can be found at https://flask-login.readthedocs.io/en/latest/.
For creating and checking a password hash: When working with Flask often werkzeug security is used to create/hash and check passwords. A snippet in which this is demonstrated can be found here : http://flask.pocoo.org/snippets/54/
Finally an internet search (I have not used any of these tutorial/pages before) retrieved following page: https://blog.miguelgrinberg.com/post/two-factor-authentication-with-flask with a quick browse of the page I found an example of using flask-login and werkzeug for user-login/logout under the title 'The First Factor: Password Authentication'. A quick pointer when using this tutorial is that there have been some changes in naming since the page has come online. For example flask.ext.login has been renamed to flask_login. The tutorial http://blog.sampingchuang.com/setup-user-authentication-in-flask/ also provides more information on flask-login and werkzeug. The pointer on renaming is also valid for this one.

Convert wordpress password to BCrypt-based

I have an old project which is using Wordpress, currently we create a new project and need to migrate the user's data into the new database (also Mysql).
The new database is using Bcrypt for encoding password for users. The old encode type in wordpress is like:
$P$BdsGKKQnnH6mi9hznpibst1jl/6G4z1
I think it might be MD5-based or not. I looked this link: http://stackoverflow.com/questions/1045988/what-type-of-hash-does-wordpress-use
I want to find a way to convert this type of password to Bcrypt-based. Maybe mysql script could help me convert? Can anyone give me some suggestions? Thanks.
I dont know if you can login to the admin panel or not. Chances are that you cant, but if you can somehow reset the password field with a known bCrypt hash for the admin. Then you can use this plugin to change the encryption from md5 to bcrypt for all your passwords.
https://wordpress.org/plugins/wp-bcrypt/

Where does Chrome keep the SQLite Database file it writes things like stored passwords to?

Just like the title says, where does Chrome keep the SQLite file that holds things like stored passwords. I've found the follow database files and neither one of them hold the stored password information -
C:\Users\George\AppData\Local\Google\Chrome\User Data\Default\databases\Databases.db
and
C:\Users\George\AppData\Local\Google\Chrome\User Data\Default\Sync Data\SyncData.sqlite3
You are looking in the wrong places. By the way, the passwords are encrypted.
Use SQL-Lite viewer to view the contents of the file Login Data.
In Windows: LocalAppData\Google\Chrome\User Data\Default\Login Data
In Mac: ~/Library/Application Support/Google/Chrome/Default/Login Data
Once you find those files you can use Chrome password decryptor to see the password database if I remember corectly.

How do I reset a user password in hudson?

I've lost the admin user password on hudson (actually it just randomly stopped working), I can get back in by disabling security (editing ~/.hudson/config.xml) then I can configure hudson, but I can't find any options to add new users or change/reset user passwords - maybe these options don't appear when security is disabled? I was using the matrix-based security. How can I add a new user or reset the password for existing ones?
Here is an article outlining how that is achieved.
The first one: edit the authorization setting in the config.xml file
if you have defined more users in your Hudson and you at least one
user’s password. For example, your user name called peter and you know
the password of the user jack, in this case, just open the
%HUDSON_HOME%/config.xml and find the line:
<permission>Hudson.model.Hudson.Administer:peter</permission>
And add a new line below:
<permission>Hudson.model.Hudson.Administer:jack</permission>
Save your change and restart your Hudson server, then you can login as
jack and change your own password. After then login using your own
account and go to http://your/hudson/configure and change jack back
to his normal authorization setting.
The other way ist just editing your own config.xml, in this case, open
%HUDSON_HOME%/your/config.xml and find the line:
<password>………</password>
The text between the password tag is encoded, so you can’t just enter
your password as plain text here. The easy way for you now is just
remove all the text between that tag, in another word, just let the
password empty.
Hope this helps.
In Hudson 3.0, security is defined in a separate file, hudson-security.xml. Same directory though.
Just edit the <useSecurity>true</useSecurity> entry and specify false.
If you have access to the jenkins files, edit the config.xml.
/var/lib/jenkins/config.xml
Change
<useSecurity>true</useSecurity>
<useSecurity>false</useSecurity>
And comment to
<authorizationStrategy/>
Ref:
http://it.i88.ca/2013/04/reset-password-of-jenkins.html
Greetings!
I use Jenkins, but this should be similar in Hudson. You need to be logged in as a user with administrative permissions, so configuring Hudson to use security is essential. Look for a 'Manage Users' link in the 'Manage Hudson' page (the main configuration page linked from the main page). The 'Manage Users' page should give you a list of users that have been configured for use with Hudson and you should be able to add/edit/delete users from here.
Read this article for more information on configuring security in Hudson.

how do you make use of AclExtension and mercurial-server/hg-ssh?

mercurial-server manages user database under keys folder. Users and groups are represented by files and folders.
AclExtension relies on linux user group through ssh.
they don't seem to match. or did I miss something?
I have managed to make mercurial-server work. but just don't see how to integrate AclExtension with it so I may have finer grained access control.
Unfortunately, the AclExtension does key its access off of usernames. If you are creating separate UNIX user accounts for each using with hg-ssh you've got everything you need, but if all of your ssh users are using the same Unix user account then the AclExtension isn't going to work for you.
Unless...
I did just look into the acl.py file and it looks like it uses the getpass.py module's getuser which checks the environment for the user name using this code:
for name in ('LOGNAME', 'USER', 'LNAME', 'USERNAME'):
user = os.environ.get(name)
if user:
return user
so it might be possible to fake that out by setting an environment variable in the hg-ssh user's authorized_keys file like this:
command="hg-ssh path/to/repo" environment="LOGNAME=fakeusername" ssh-dss ...
where then you could put fakeusername in ACL rules, and could have a different fakeusername for each key, all running under the same UNIX account.
BTW: Everyone seems to just use hg-ssh alone, I never see the (non-official) mercurial-server app used anymore.
The environment trick doesn't seem to work on my Solaris box; my solution was to pass in the fakeusername as a parameter to hg-ssh and have that set os.environ['LOGNAME'] so that getpass sees it.
command="hg-ssh fakeusername" ssh-dss ...