You are not logged in.
Pages: 1
Hello all! I'm new to the forum. First of all thank you so much for such an amazing product, this ReportServer is awesome.
I'm writing some scripts to deploy it to AWS via CDK and everything is going great. The one thing I'd like to do, if possible, at my setup, before even RS is launched on a browser, replace the ROOT's password with one I'm generating in AWS using secrets manager.
Is it possible, can someone point me in the right direction, to figure out how to encrypt my password and update the RS_USER table with it in such a way that RS can actually use it for the ROOT user that is being automatically created?
If I can piggy back the question: If we get the enterprise version, can I use scripting to do this and also deploy data sources and some reports even before using the RS UI or even if I need to use the UI but in some sort of pre-packaged script that I can make?
Thanks a lot!
Offline
Hi telpochyaotl,
you can use scripting for this, e.g. using the method net.datenwerke.security.service.usermanager.UserManagerService.setPassword(User, String) for setting the user's password.
Since you are setting the user username and password at first run, you can use the same file our bitnami package uses for this: rsinit.properties.
Here is an example rsinit.properties file used in our bitnami package:
usermanager.root.username=user
usermanager.root.firstname=FirstName
usermanager.root.lastname=LastName
usermanager.root.email=user@example.com
usermanager.root.password=bitnami
cfg.main.localization_cf.localization.default=en
rsinit.keepfile=true
cfg.mail.mail_cf.smtp.host=smtp.gmail.com
cfg.mail.mail_cf.smtp.port=465
cfg.mail.mail_cf.smtp.username=user@gmail.com
cfg.mail.mail_cf.smtp.password=password
cfg.mail.mail_cf.smtp.ssl=true
cfg.mail.mail_cf.smtp.tls.enable=false
cfg.mail.mail_cf.smtp.tls.require=false
democontent.install=true
Note that you should set rsinit.keepfile=false for deleting the file after initial installation.
If you create such a file and put it in your classpath e.g. WEB-INF/classes, the settings here used.
You can of course run scripts without using the GUI by calling a URL: https://reportserver.net/en/guides/scri … rs/Basics/
3.2. Executing Scripts via URL
so if you write a script you can execute it by just calling the URL. Note that you can also schedule script: https://reportserver.net/en/guides/scri … g-Scripts/
Regards,
Eduardo
Offline
Eduardo,
First thank you so much for your response. It is truly valuable information! I searched the RS site and forum and found no mention of the rsinit, so I would not have found it easy. Grepping the code I see a few appearances of course but would not have been easy to guess...
You are very kind. I am about to give it a try.
Not having found docs about it, I'm very curious to know what all I can do with the init script. What would be the best way to find out all i can do with it?
As far as the scripts, that's also great news. I assume this is only possible in the enterprise version, correct?
Thank you again! Given your name, may I say Mil Gracias!
Offline
Hello again!
I've placed the rsinit.properties both in the WEB-INF/classes and just in case also in the /opt/reportserver i made during installation where the persistance.properties also resides, but no luck with the file being acted upon at least for what I can see... Nothing in tomcat logs about it either... Do i have to enable something in config? or any other pointers as to why it's not being used?
Thank you again and sorry for the trouble.
Offline
Ok, i think it worked, i deleted the database and placed the file in several places, I think the one in /opt/reportserver/config is the one worked, it looked like that was the right place after looking at the code... Will clean up and try it all again tomorrow and post here the final way so that others can use this info as well... Thanks again!
Offline
Ok, here just confirming, I had to place the file in the /opt/reportserver folder I created when I followed the manual installation instructions. Also, the database had to be clean, it seems it only runs on the first startup on a clean DB, but i could be wrong about a few details. The script was only ran (the root user was added to RS_USER table) when I first accessed the portal and tried to login, before that there was no root user....
Don't have better details for others but that worked for me.
Thanks Eduardo for sharing this!
Take care.
Offline
Hi telpochyaotl,
thanks for letting us know, I am glad this worked!
Yes, this script only runs the very first startup on a clean DB.
Regards,
Eduardo
Offline
Pages: 1