Challenge Overview

Project Overview

You may remember Go learning challenge series: http://www.topcoder.com/challenge-details/30046224/?type=develop&noncache=true

Now we began the real project with Go language!

The client is a leading cloud-based security provider in Japan. 

In this project, we will develop a mail proxy server which talks to POP/IMAP servers and MUA(Mail Client Software).

Competition Task Overview

In this challenge, you need to OAuth authentication to the code we built that already supports some POP commands.

In a past challenge we created a PoC to do this, code is provided in forum for reference.

We've also attached some sequence diagrams to help you better understand this, see this post.

Requirements & Notes

To complete this:

  • The developer needs to have an admin access of Google Apps (not public GMail. You can create a Google Apps trial for free)
  • Then needs to create "Service Account" and have these data in the proxy code.
  • The proxy needs to handle XOAuth2 to connect to Google Apps.

Also if you check the sequence diagram:

  • The proxy authenticates a user with domains.json of the mock server (e.g. "takumi" and "ilovego"). Then it connects to the Google Apps Mail server using the username and domain (e.g. "takumi@topcoder.com").
  • To connect, you need to get an access_token for Google Apps and authenticate with XOAuth2. After that, it works as a normal mail proxy as it was, check this reference.
  • To get the access_token, you need to use the "Service Account" and the impersonate users email, check this and this,
  • For the above reason, you cannot develop this challenge with GMail only, but need to have an administrator account of Google Apps. (And update domains.json with your domain and account info.) You can create a Google Apps trial for free.

Testing

You must test your solution to make sure "POP min" test scenario works properly after adding OAuth. You can record and attach some application log between the servers in the submission to proof it. You can find the test scenario and in the forum.

Dev Process

We're going to use gitlab for this project and we'll follow the following process:

  1. ���We push the original source tree to the private repository and create a challenge to update it (we'll provide link to source tree in forum)
  2. You should request access to it in the forum by providing your gitlab username. We will add you as "Developer" to the repo
  3. You can fork our tree and make updates to your local branch. You must add tiwasaki and huangqun as "Master" and reviewers as "Reporter" to your private branch.
  4. You must submit the branch name on topcoder.  You should NEVER make a merge request because it can be visible to other registrants
  5. The reviewers review your submission based on the code in the branch and score the submission
  6. Once winner is selected, the winner will need to fix all issues found in review and submit a pull/merge request
  7. The winner will also help with merging in case of conflicts

Code Guidelines

Follow practices mentioned in the articles below:

  • http://golang.org/doc/effective_go.html
  • https://code.google.com/p/go-wiki/wiki/CodeReviewComments#Go_Code_Review_Comments

The client has a following naming conventions:

  • Use ‘lower_case_with_underscore’ name for package, file or directory. However, try to avoid underscores and prefer short names.

External Libraries

If you would like to use external libraries please follow the guidelines below:

  • Do not use libraries developed with languages other than Golang
  • Do not use GPL libraries and LGPL libraries
  • MIT, Apache and BSD libraries are fine
  • Please mention about external libraries you used in your README

Code Design

We will enhance the code in future challenges and so your code should prepare for it (which is related to scorecard question 1.1.6).

You can see from the test scenarios we'll have the following implemented in future challenges:

  • POP/IMAP support in the single source
  • We are going to support more POP commands
  • SSL connection
  • POP UIDL command performance improvement

Scorecard

We are using a custom scorecard for this challenge.

Test Code

- You should write at least one unit test file (*_test.go) for each go file.
- You should NOT use a shell script for test, you should write any test script with go only.
- Functional test which follows the test scenario with go file.
- It should cover more than 75% code (You can measure it with `go test -cover`)

Technology Overview

  • Go
  • POP
  • Gmail OAuth

Documentation Provided

Register to see resources in challenge forum.



Final Submission Guidelines

Submission Deliverables

  • Source code (Format your code with ‘gofmt’ command)
  • Test code (*_test.go).
  • README to explain your deliverables and how to setup your submission and verify the features. This README should be included in your own gitlab repo.

Final Submission

For each member, the private gitlab repo / branch name and link must be uploaded via the challenge detail page on topcoder.com

ELIGIBLE EVENTS:

2015 topcoder Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30047313