java - Hard coded authentication for easier debugging -
java - Hard coded authentication for easier debugging -
to create debugging easier coded authentication hard in application, like:
user admin = new user("admin", "pw"); currentuser = admin; i’m lazy , don’t want delete these lines every time publish new version, created property-file debug-flag. when flag set on “true”, application starts in debug-mode without authentication, otherwise log-in shown.
but i’m concerned fact, easy admin-access. how solve problem?
kind regards stormsam
the solution problem not that!
this can lead several issues:
too easy admin access, state incorrect application behaviour or bad debugging info. might test , debug admin, certainly users not admins! it command path in , of has planned around, coded , testeda improve solution might have mutual admin login , password on dev systems. can automatically type in or code tests. mutual login regular user thought can readily test that.
depending on kind of testing , debugging doing, can write automated tests (perhaps junit , selenium) test application? can run tests against instance of app in debugging mode. test take care of mundane setup , login steps can focus on thing needs debugged.
java security debugging
Comments
Post a Comment