| Summary: | mvn publican-push should return 403 (Forbidden) when pushing source by a non-maintainer | ||
|---|---|---|---|
| Product: | [Retired] Zanata | Reporter: | Kenichi Takemura <ktakemur> |
| Component: | Component-Maven | Assignee: | Alex Eng <aeng> |
| Status: | CLOSED WORKSFORME | QA Contact: | Zanata-QA Mailling List <zanata-qa> |
| Severity: | medium | Docs Contact: | |
| Priority: | low | ||
| Version: | 2.0 | CC: | djansen, ebaak, mkim, sflaniga, zanata-bugs |
| Target Milestone: | --- | Keywords: | TestBlocker |
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-02-28 05:19:57 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
|
Description
Kenichi Takemura
2011-05-04 04:34:51 UTC
I think this is a test blocker. Set higher priority and keyword. Please provide information about work-around. Thanks! Please check that the API key in zanata.ini matches the key in your profile page. Also, please attach the end of your server.log (eg /opt/jboss-ewp-5.0/jboss-as-web/server/default/log/server.log). (In reply to comment #2) > Please check that the API key in zanata.ini matches the key in your profile > page. Also, please attach the end of your server.log (eg > /opt/jboss-ewp-5.0/jboss-as-web/server/default/log/server.log). When I set wrong API key purposely, the error looks different. Embedded error: Error status 401 Unauthorized returned I confirmed the API key is ok. I paste in here from the log file, the log produced when I ran the mvn command. 2011-05-05 03:04:29,796 INFO [net.openl10n.flies.action.AuthenticationEvents] (http-unused-12-214.bne.redhat.com%2F10.64.12.214-8080-1) Account kenichi authenticated 2011-05-05 03:04:39,111 INFO [net.openl10n.flies.action.AuthenticationEvents] (http-unused-12-214.bne.redhat.com%2F10.64.12.214-8080-1) Account kenichi authenticated 2011-05-05 03:04:39,552 INFO [net.openl10n.flies.action.AuthenticationEvents] (http-unused-12-214.bne.redhat.com%2F10.64.12.214-8080-1) Account kenichi authenticated Hi it works now. I just knew username should be in the project maintainer. But i think error message does not look properly. I will change summary to request for change of error message. When username in zanata.ini does not belong to the project maintainer, mvn zanata:publican-push command fails in operation returned 401 (Unauthorized): but this should be corrected to let user know about he/she needs to join the project maintainer. And...why the error message has html format? Assigning to Scrum product owner for prioritisation. Is this still a problem on the newer versions? Thanks. I don't think the situation has changed, but on reflection I think the server should be using 403 FORBIDDEN for this, not 401. And the Java client should handle the error in a friendlier way. Tested with maven client 2.0.2-SNAPSHOT.
Yes, maven client does return 401 if the user is not a project maintainer.
I suggest the error message should be:
You should be a project maintainer to be able to push sources to this project.
I will also change the title from
mvn zanata:publican-push is rejected due to 401 (Unauthorized) when username does not belong to the project maintainer
to:
mvn publican-push should retrun 403 (Forbidden) when pushing source by a non-maintainer.
Retested at 54d204020b600be1e8e3c1a9a357a0e02e832861 [ERROR] Failed to execute goal org.zanata:zanata-maven-plugin:3.3.0:push (default-cli) on project standalone-pom: Zanata mojo exception: Server returned error status: 403. Error message: You do not have permission to upload source documents to project-version "skynet:1". -> [Help 1] |