// This function is designed with **GDPR compliance** in mind, specifically addressing the roles
// and responsibilities of a desktop application developer when handling user credentials
// for a third-party service (Winlink).
//
// --- GDPR Compliance Summary ---
//
// 1. **Role as Data Controller:**
// For the process of collecting, transferring to Winlink, and securely storing user credentials (callsign, password, recovery email) locally, this application acts as a **Data Controller**. We determine the purpose and means of this specific data processing.
//
// 2. **Lawful Basis for Processing (Consent):**
// User **consent** (GDPR Article 6(1)(a)) is the chosen legal basis.
// - **Informed Consent:** The user is provided with a clear, concise, and prominent consent dialogue that explicitly states:
// - Which data (callsign, password, recovery email) is collected.
// - The purpose of collection (Winlink account creation).
// - That data is sent *directly* to Winlink's API.
// - That callsign and password will be stored *locally* in the application's configuration file for continued access, and that the developer does not have access to these local credentials.
// - Links to Winlink's Terms and Conditions and Privacy Policy.
// - **Unambiguous Consent:** Consent is obtained through an active, explicit action by the user (repeating their callsign to confirm). This goes beyond a simple "Yes/No" to demonstrate clear intent.
//
// 3. **Transparency and Information Duty (GDPR Article 13):**
// The consent dialogue fulfills the information requirements by clearly communicating:
// - The identity of the controller (the application/developer implicitly).
// - The purposes of processing.
// - The recipients of the data (Winlink).
// - The fact of local storage and its purpose.
// - Links to relevant third-party policies (Winlink).
// - Implicitly, users retain rights over their data, both with Winlink and for the locally stored credentials (e.g., through application features for credential management).
//
// 4. **Security and Data Protection by Design (GDPR Articles 25 & 32):**
// - **Data Minimization:** Only necessary data for account creation and local access is collected.
// - **Secure Transmission:** All communication with Winlink's API (including credentials) occurs over **HTTPS/TLS** to ensure data integrity and confidentiality during transit.
//
// By adhering to these principles, this function aims to ensure robust GDPR compliance for the account creation and local credential storage process.
fmt.Println("\nWould you like to create a new Winlink account? It is highly recommended to do so.")
fmt.Println("\n⚠ Account creation skipped. If you connect to the Winlink system without an active account, an over-the-air activation process will be initiated by the CMS. You'll receive a generated password the first time you connect. DO NOT LOSE THIS PASSWORD, AS YOU WILL BE LOCKED OUT OF THE SYSTEM.")
fmt.Println("⚠ Warning: You have chosen not to provide a password recovery email. If you proceed and forget your password, it cannot be recovered!")
resp:=prompt("Are you sure?","N","y")
ifresp!="y"&&strings.ToLower(resp)!="yes"{
log.Fatal("Winlink account creation cancelled")
}
}
getConsent:=func(callsignstring)bool{
fmt.Println()
fmt.Println("======== CONSENT REQUIRED ========")
fmt.Println("To create your Winlink account, we'll send your chosen callsign, password, and recovery email address directly to the Winlink system.")
fmt.Println()
fmt.Println("Your callsign and password will also be stored locally on your computer in the configuration file. This is so you can log in and use Winlink services directly from here.")
fmt.Println()
fmt.Println("By proceeding, you agree that your data will be handled according to Winlink's Terms, Conditions and Privacy Policy:")
fmt.Println("* https://winlink.org/terms_conditions (Terms, Conditions and Privacy Policy)")
fmt.Println("")
fmt.Println("Do you agree to create your Winlink account and store your credentials locally?")
fmt.Println("==================================")
for{
switchresp:=strings.ToUpper(prompt("Repeat your callsign to confirm your consent",""));resp{
case"":
returnfalse
casecallsign:
returntrue
default:
fmt.Println("✗ Callsigns do not match. Please try again.")