SOLVED - Ticket: Principle of Least Privilege

Hi,

I completed all the steps required to configure new user and modified SRV connection in .ini file with the new credentials as well. However, I am failing the test. Could you please help me understand as what could be the issue?

Note: All other tests are passing

Thank you!

I found the issue. I have incorrectly selected admin privileges for any database for this new user. When I changed the role to ‘readWrite’ access to mflix database, that resolved the issue.

1 Like

@ksp585

Could you tell me how you pass the error handling test? I have to modify some code that we are not supposed to touch. I am just wandering if it is necessary. Thanks.

Q Yang

@nayamama: This is my code for error handling test.

except (StopIteration) as _:

    """
    Ticket: Error Handling

    Handle the InvalidId exception from the BSON library the same way as the
    StopIteration exception is handled. Both exceptions should result in
    `get_movie` returning None.
    """

    return None
except (InvalidId) as _:
    return None
2 Likes

@ksp585

Great, thanks for your reply. Your response pushed me to re-download the new version code. They modified the function I mentioned. So new code is bug free.

Q Yang

1 Like

i have readWrite Acces only to the user still its not validatiing.can you tell what can be the possible causes?

you have to change
Advanced Roles/Privileges